re PR c++/72707 (local anonymous union member hides names in the same scope)
authorJakub Jelinek <jakub@redhat.com>
Wed, 21 Dec 2016 22:49:59 +0000 (23:49 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 21 Dec 2016 22:49:59 +0000 (23:49 +0100)
commitb5f8e89ed7dc34e6850430315730b7601032bd89
treee36e7de06e1786577ffec8b958e8d624efa967e0
parentd8ee9c7e549352147b9fc91ae8f5d8a007352894
re PR c++/72707 (local anonymous union member hides names in the same scope)

PR c++/72707
* name-lookup.c (pushdecl_maybe_friend_1): Do check shadowing of
artificial x if it is an anonymous union variable.

* g++.dg/warn/Wshadow-12.C: New test.

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