https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64758
Jonathan Wakely changed:
What|Removed |Added
CC||kamil_tym at wp dot pl
--- Comment #8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64758
Andrew Pinski changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64758
--- Comment #6 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #4)
> For this code:
>
> enum class foo : bar { baz };
> auto x = foo::baz;
>
> We give:
>
> e.C:1:6: warning: elaborated-type-specifier for a scoped enum must
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64758
--- Comment #5 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #4)
> I suggest that we should notice that ": bar" is bad, give an error about
> "bar" being undeclared, and then act as though no enum-base was present for
> the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64758
--- Comment #4 from Jonathan Wakely ---
For this code:
enum class foo : bar { baz };
auto x = foo::baz;
We give:
e.C:1:6: warning: elaborated-type-specifier for a scoped enum must not use the
‘class’ keyword
1 | enum class foo : bar { baz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64758
Jonathan Wakely changed:
What|Removed |Added
See Also||https://gcc.gnu.org/bugzill
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64758
--- Comment #2 from Andrew Pinski ---
It got worse (maybe better) in GCC 9.4.0 and 10+:
:3:14: error: found ':' in nested-name-specifier, expected '::'
3 | enum Waldo : uint32_t { // oops, forgot to include
| ^
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64758
Jonathan Wakely redi at gcc dot gnu.org changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64758
--- Comment #1 from Nathan Ridge zeratul976 at hotmail dot com ---
By comparison, clang's error is:
test.cpp:1:14: error: unknown type name 'uint32_t'
enum Waldo : uint32_t {
^