Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!ALW.NIH.GOV!elsie!ado From: elsie!ado@ALW.NIH.GOV (Arthur David Olson) Newsgroups: gnu.gcc.bug Subject: Gnu gcc 1.36 "-Wshadow" and "-finline-functions" don't mix Message-ID: <8909261533.AA17977@elsie> Date: 26 Sep 89 15:33:26 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 38 (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 Tue Sep 26 11:31:40 1989 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 gcc version 1.36 elsie$ /usr/local/bin/gcc -c try.c elsie$ /usr/local/bin/gcc -c -Wshadow try.c elsie$ /usr/local/bin/gcc -c -finline-functions try.c elsie$ /usr/local/bin/gcc -c -Wshadow -finline-functions try.c try.c: In function b: try.c:12: warning: declaration of `i' shadows a parameter elsie$ exit script done on Tue Sep 26 11:32:35 1989 -- To understand Sun's corporate culture look at the vi source code. Arthur David Olson ado@alw.nih.gov ADO is a trademark of Ampex.