[Bug c++/91787] New: an elaborated-type-specifier only takes plain "enum", gcc accept ill-formed, while it should not.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug c++/91787] New: an elaborated-type-specifier only takes plain "enum", gcc accept ill-formed, while it should not.

marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91787

            Bug ID: 91787
           Summary: an elaborated-type-specifier only takes plain "enum",
                    gcc accept ill-formed, while it should not.
           Product: gcc
           Version: 8.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: derrick at ca dot ibm.com
  Target Milestone: ---

Refer to C++11 N3290 7.1.6.3 Elaborated type specifiers
An enum-specifier needs the body of the definition, and an
elaborated-type-specifier only takes plain "enum".
Following code compile failure on clang8.0, and gcc accept it while it should
not.

using var =  enum  struct alignas(1) var;
Reply | Threaded
Open this post in threaded view
|

[Bug c++/91787] an elaborated-type-specifier only takes plain "enum", gcc accept ill-formed, while it should not.

marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91787

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-09-23
     Ever confirmed|0                           |1