-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Open
Labels
clang-cl`clang-cl` driver. Don't use for other compiler parts`clang-cl` driver. Don't use for other compiler partsclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
The following example should be rejected, because E is an enumeration type without fixed underlying type and thus incomplete within it's enumerator list. However, Clang currently accepts in Clang-cl mode (demo).
enum E {
n = sizeof(E),
};Another example shows that the underlying type is assumed to be int here.
As MSVC is (incorrectly) doing the same, perhaps such behavior is kept for bug-compatibility. But given such "extension" can be undesired, because the underlying type can become another type when the enumeration becomes complete, perhaps we should consider turning it off by default, or even removing it one day.
Metadata
Metadata
Assignees
Labels
clang-cl`clang-cl` driver. Don't use for other compiler parts`clang-cl` driver. Don't use for other compiler partsclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"