Article View: gnu.gcc.bug
Article #2903Gnu gcc 1.37 "-Wshadow" and "-finline-functions" don't mix
From: Arthur David Olson
Date: Mon, 26 Feb 1990 18:24
Date: Mon, 26 Feb 1990 18:24
39 lines
1619 bytes
1619 bytes
(We're running SunOS 4.0.3 on a Sun 3/280.)
Description:
If gcc's "-finline-functions" option is used and merged functions
have identically named variables, the "-Wshadow" option causes
bogus warnings.
Repeat-By:
Script started on Mon Feb 26 13:22:51 1990
elsie$ cat try.c
int
a(i)
int i;
{
return i;
}
int
b(i)
int i;
{
return a(i);
}
elsie$ /usr/local/bin/gcc -v -c -Wshadow -finline-functions try.c
gcc version 1.37
/usr/local/lib/gcc-cpp -v -undef -D__GNUC__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 try.c /usr/tmp/cca19246.cpp
GNU CPP version 1.37
/usr/local/lib/gcc-cc1 /usr/tmp/cca19246.cpp -quiet -dumpbase try.c -finline-functions -Wshadow -version -o /usr/tmp/cca19246.s
GNU C version 1.37 (68k, MIT syntax) compiled by GNU C version 1.36.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
try.c: In function b:
>>>> try.c:12: warning: declaration of `i' shadows a parameter
as -mc68020 -o try.o /usr/tmp/cca19246.s
elsie$ exit
script done on Mon Feb 26 13:23:27 1990
--
Arthur David Olson ado@alw.nih.gov ADO is a trademark of Ampex.
Technical Details
Message-ID:
<9002261824.AA19276@elsie>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!UUNET.UU.NET!nih-csl!elsie!adoShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!UUNET.UU.NET!nih-csl!elsie!ado From: nih-csl!elsie!ado@UUNET.UU.NET (Arthur David Olson) Newsgroups: gnu.gcc.bug Subject: Gnu gcc 1.37 "-Wshadow" and "-finline-functions" don't mix Message-ID: <9002261824.AA19276@elsie> Date: 26 Feb 90 18:24:49 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 39