This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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: annoying -Wshadow warning


On Tue, 9 Jul 2002, Doug Evans wrote:

> It's worse than useless.
> It can vastly reduce the signal/noise ratio of gcc output.
> It bubbles up parameter names in header files into the global namespace.
> 
> Suppose I have an app that uses two separate libraries and one
> library happens to declare a function with a parameter whose name
> is that of a function in the other library [in my case bfd and rscheme].

Arguably each library should use parameter names within a namespace that
library reserves, to avoid problems with user macros as well.  (Just as
glibc uses __-prefixed parameter names, in the implementation namespace.)

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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