[gnu.gcc.bug] Gnu gcc 1.37 "-Wshadow" and "-finline-functions" don't mix

ado@UUNET.UU.NET (Arthur David Olson) (02/27/90)

(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.