]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/cp-tree.h
re PR c++/57709 (-Wshadow is too strict / has false positives)
authorManuel López-Ibáñez <manu@gcc.gnu.org>
Fri, 22 Aug 2014 19:12:46 +0000 (19:12 +0000)
committerManuel López-Ibáñez <manu@gcc.gnu.org>
Fri, 22 Aug 2014 19:12:46 +0000 (19:12 +0000)
commitb65eff46797a017f6ff524c87e8513948073c089
treec86a4aafb8a1a26f9bd4278787e962a264ab6afb
parent6c6d76bec50feb6f9d9455d968c05de121b591d8
re PR c++/57709 (-Wshadow is too strict / has false positives)

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.

From-SVN: r214357
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/name-lookup.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/Wshadow.C [new file with mode: 0644]