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++/84311] compiler accepts invalid multiple type-specifiers in a decl-specifier-seq for an enum


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84311

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-02-09
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Ha, they almost look like they might be valid and do something useful.

Compiles without error on 4.3, before any C++0x scoped enum support, so it's
not a consequence of that.

The C front-end does diagnose it:

enum.cc:1:6: error: two or more data types in declaration specifiers
 long enum E { one, two, three };
      ^~~~
enum.cc:1:25: warning: useless type name in empty declaration
 long enum E { one, two, three };
                         ^~~~~

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