-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Closed
Labels
cc23clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"documentation
Description
Hi all,
typed enums are not supported by C99 and any later C standard. It is supported by clang as a language extension of C.
See https://godbolt.org/z/4W1dMc53e as an example.
In my opinion, clang should only support typed enums in C if compiling with e.g. -std=gnu99 and not with -std=c99.
Furthermore, the documentation at https://clang.llvm.org/docs/LanguageExtensions.html#introduction is lacking information that typed enums are supported by clang in C. It is only noted that typed enums are supported for ObjectC.
Btw. GCC is not supporting typed enums in C.
Metadata
Metadata
Assignees
Labels
cc23clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"documentation