This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/84311] compiler accepts invalid multiple type-specifiers in a decl-specifier-seq for an enum
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 09 Feb 2018 15:20:46 +0000
- Subject: [Bug c++/84311] compiler accepts invalid multiple type-specifiers in a decl-specifier-seq for an enum
- Auto-submitted: auto-generated
- References: <bug-84311-4@http.gcc.gnu.org/bugzilla/>
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 };
^~~~~