This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/48062] `shadowed declaration is here' should be a note
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 05 Jun 2014 05:31:11 +0000
- Subject: [Bug c/48062] `shadowed declaration is here' should be a note
- Auto-submitted: auto-generated
- References: <bug-48062-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48062
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Thu Jun 5 05:30:39 2014
New Revision: 211254
URL: http://gcc.gnu.org/viewcvs?rev=211254&root=gcc&view=rev
Log:
PR c/48062
* c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
Print note only if the warning was printed.
* gcc.dg/Wshadow-1.c: Use dg-message for "shadowed declaration".
* gcc.dg/Wshadow-3.c: Likewise.
* gcc.dg/pr48062.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr48062.c
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-decl.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/Wshadow-1.c
trunk/gcc/testsuite/gcc.dg/Wshadow-3.c