This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: c: Improve -Wshadow warnings
- From: Richard Henderson <rth at redhat dot com>
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Cc: gcc-patches at gcc dot gnu dot org, "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Wed, 5 Dec 2001 14:53:08 -0800
- Subject: Re: c: Improve -Wshadow warnings
- References: <20011205215902.A31278@daikokuya.demon.co.uk>
On Wed, Dec 05, 2001 at 09:59:02PM +0000, Neil Booth wrote:
> * c-common.c (shadow_warning): New function, moved from cp/decl.c.
> * c-common.h (shadow_warning): New.
> * c-decl.c: Include c-common.h.
> (warn_if_shadowing): New, broken out of pushdecl.
> (pushdecl): Use warn_if_shadowing.
> (store_parm_decls): Prevent duplicate -Wshadow warnings.
> * cp/decl.c: Include c-common.h.
> (shadow_warning): Move to c-common.c.
>
> * gcc.dg/Wshadow-1.c: New test.
Ok.
r~