================ @@ -121,6 +121,17 @@ int NegativeShortTest[NegativeShort == -1 ? 1 : -1]; enum Color { Red, Green, Blue }; // expected-note{{previous use is here}} typedef struct Color NewColor; // expected-error {{use of 'Color' with tag type that does not match previous declaration}} +// Enumerations with a fixed underlying type. +// https://github.com/llvm/llvm-project/issues/116880 +#if __STDC_VERSION__ >= 202311L + typedef enum : unsigned char { Pink, Black, Cyan } Color; +#else + _Static_assert(__has_extension(c_fixed_enum), "Ensure language extension support for enumerations with a fixed underlying type in <C23"); + typedef enum : unsigned char { Pink, Black, Cyan } Color; // expected-warning {{enumeration types with a fixed underlying type are a C23 extension}} +#endif + + ---------------- justinfargnoli wrote:
Delete these lines https://github.com/llvm/llvm-project/pull/117507 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits