clang accepts 'enum struct' in C mode with warning despite being unusable #42372
Labels
bugzilla
Issues migrated from bugzilla
c
clang:diagnostics
New/improved warning or error message in Clang, but not in clang-tidy or static analyzer
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
confirmed
Verified by a second party
Extended Description
In C mode, Clang accepts this code with a warning:
enum struct Foo {
A
};
However, it is useless. None of the members seem to be accessible.
I've tried typedefs, ::, :, ., ->, casts, but nothing seems to allow me to access A.
Either these should be allowed as a documented extension with ::, or treated as a syntax error.
The text was updated successfully, but these errors were encountered: