This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/70241] Enumerators introduced out-of-line by extending an opaque enum definition always get private accessibility


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]