This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Failed to build bfin-elf-as because of shadowed declaration.


On 01/14/2010 04:02 PM, Mike Frysinger wrote:
On Wednesday 13 January 2010 23:51:51 Jie Zhang wrote:
On 01/14/2010 09:59 AM, Masaki Muranaka wrote:
I've some warnings when building tc-btin.c (the version of
i386-pc-mingw32-gcc is 3.4.5). This can be fixed routinely. I hesitate to
create patch though since there are a lot of declarations in bfin-aux.h.
It's possible to fix the place we get warnings. But it brakes some kind
of consistency. Do we need variable names in global declaration there?

I don't think so. It seems gcc-3.4 is stricter than gcc-4.x on shadow warning. gcc-4.x does not report these warnings.

-Wshadow was just added to cvs binutils ...

gcc-4.4 builds cvs binutils for bfin-elf target without shadowed warnings. The problem is gcc-3.4 even (uselessly) warns on the following case, while gcc-4.x does not:


$ cat t.c
int foo;
int bar (int foo);

$ gcc-3.4 -S -Wshadow t.c
t.c:2: warning: declaration of 'foo' shadows a global declaration
t.c:1: warning: shadowed declaration is here
$

$ gcc-4.4 -S -Wshadow t.c
$


Jie



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]