re PR c++/30566 (-Wshadow warns about clashes between nested function parameters...
authorShujing Zhao <pearly.zhao@oracle.com>
Fri, 14 May 2010 03:19:32 +0000 (03:19 +0000)
committerShujing Zhao <pzhao@gcc.gnu.org>
Fri, 14 May 2010 03:19:32 +0000 (03:19 +0000)
commit74b80262bc639e23b4a94175b1ce1926dfa3477b
treef4ce482422a000b01c2eb294d32765fb926b0447
parente15a8cbe1a7d51072a1b998ccfa6f1977b8688fc
re PR c++/30566 (-Wshadow warns about clashes between nested function parameters in C++)

gcc/cp/
2010-05-14  Shujing Zhao  <pearly.zhao@oracle.com>

        PR c++/30566
        * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
        shadowing the outer parameter or variables by the declaration of
        nested function in nested structure or class. Warn the shadowing by
        the declaration of nested lambda expression.

gcc/testsuite/
2010-05-14  Shujing Zhao  <pearly.zhao@oracle.com>

        PR c++/30566
        * testsuite/g++.dg/warn/Wshadow-4.C: Adjust.
        * testsuite/g++.dg/warn/Wshadow-5.C: New test.
        * testsuite/g++.dg/warn/Wshadow-6.C: New test.

From-SVN: r159383
gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wshadow-4.C
gcc/testsuite/g++.dg/warn/Wshadow-5.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Wshadow-6.C [new file with mode: 0644]