This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/529] -Wshadow warns on function prototypes vs. global vars
- From: "cvs-commit at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jul 2005 23:58:49 -0000
- Subject: [Bug c/529] -Wshadow warns on function prototypes vs. global vars
- References: <20000912113600.529.im14u2c@primenet.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-07-29 23:58 -------
Subject: Bug 529
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: jsm28@gcc.gnu.org 2005-07-29 23:58:37
Modified files:
gcc : ChangeLog c-decl.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg: Wshadow-3.c
Log message:
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.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9608&r2=2.9609
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&r1=1.677&r2=1.678
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5854&r2=1.5855
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/Wshadow-3.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=529