This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70241] Enumerators introduced out-of-line by extending an opaque enum definition always get private accessibility
- From: "ppalka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 26 Apr 2016 22:25:15 +0000
- Subject: [Bug c++/70241] Enumerators introduced out-of-line by extending an opaque enum definition always get private accessibility
- Auto-submitted: auto-generated
- References: <bug-70241-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70241
--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Author: ppalka
Date: Tue Apr 26 22:24:43 2016
New Revision: 235456
URL: https://gcc.gnu.org/viewcvs?rev=235456&root=gcc&view=rev
Log:
Fix PR c++/70241 (inconsistent access with in-class enumeration)
gcc/cp/ChangeLog:
PR c++/70241
* decl.c (build_enumerator): Set current_access_specifier when
declaring an enumerator belonging to an in-class enumeration.
* parser.c (cp_parser_check_access_in_redecleration): Also
consider in-class enumerations.
gcc/testsite/ChangeLog:
PR c++/70241
* g++.dg/cpp0x/enum32.C: New test.
* g++.dg/cpp0x/enum33.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/enum32.C
trunk/gcc/testsuite/g++.dg/cpp0x/enum33.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog