re PR c/529 (-Wshadow warns on function prototypes vs. global vars)
authorJoseph Myers <joseph@codesourcery.com>
Fri, 29 Jul 2005 23:58:37 +0000 (00:58 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Fri, 29 Jul 2005 23:58:37 +0000 (00:58 +0100)
commit7c47d6e984423f92f6f7d40e37026ae9402d579a
tree3ad218f5e1b3a354c3a0ba4c3d6b6756f4ca0a8d
parent3bc751bdfeb8cdd76c9a0214f0f9da6b440b590c
re PR c/529 (-Wshadow warns on function prototypes vs. global vars)

PR c/529
* c-decl.c (warn_if_shadowing): Don't check for PARM_DECL in
nested function declarators.
(pushdecl): Don't call warn_if_shadowing for PARM_DECL.
(grokparms): Call warn_if_shadowing for parameters used within the
parameter list.
(store_parm_decls_newstyle): Call warn_if_shadowing for parameters
not used within the parameter list.
(store_parm_decls_oldstyle): Call warn_if_shadowing for parameters.

testsuite:
* gcc.dg/Wshadow-3.c: New test.

From-SVN: r102571
gcc/ChangeLog
gcc/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wshadow-3.c [new file with mode: 0644]