This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: annoying -Wshadow warning
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Doug Evans <dje at transmeta dot com>
- Cc: <gcc-bugs at gcc dot gnu dot org>
- Date: Tue, 9 Jul 2002 22:29:56 +0100 (BST)
- Subject: 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