[Bug c++/57709] -Wshadow is too strict / has false positives
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 22 19:13:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57709
--- Comment #13 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Author: manu
Date: Fri Aug 22 19:12:46 2014
New Revision: 214357
URL: https://gcc.gnu.org/viewcvs?rev=214357&root=gcc&view=rev
Log:
gcc/cp/ChangeLog:
2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/57709
* name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
declaration shadows a function declaration, unless the former
declares a function, pointer to function or pointer to member
function, because this is a common and valid case in real-world
code.
* cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
Improve description.
gcc/testsuite/ChangeLog:
2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/57709
* g++.dg/Wshadow.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/Wshadow.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/name-lookup.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list