annoying -Wshadow warning

Joseph S. Myers jsm28@cam.ac.uk
Tue Jul 9 14:50:00 GMT 2002


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



More information about the Gcc-bugs mailing list