[Bug c++/72707] [5/6/7 regression] local anonymous union member hides names in the same scope
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 21 22:50:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72707
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Dec 21 22:49:59 2016
New Revision: 243877
URL: https://gcc.gnu.org/viewcvs?rev=243877&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/g++.dg/warn/Wshadow-12.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/name-lookup.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list