[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 3 09:50:24 PST 2024
================
@@ -1996,7 +1996,13 @@ This specifies that the underlying type, which is used to store the enumeration
value, is ``unsigned char``.
Use ``__has_feature(objc_fixed_enum)`` to determine whether support for fixed
-underlying types is available in Objective-C.
+underlying types is available in Objective-C
+
+Use ``__has_extension(c_fixed_enum)`` to determine whether support for fixed
+underlying types is available in C prior to C23
+
+Use ``__has_feature(c_fixed_enum)`` to determine whether support for fixed
+underlying types is available in C23 and later
----------------
AaronBallman wrote:
```suggestion
underlying types is available in Objective-C.
Use ``__has_extension(c_fixed_enum)`` to determine whether support for fixed
underlying types is available in C prior to C23. This will also report ``true`` in C23
and later modes as the functionality is available even if it's not an extension in
those modes.
Use ``__has_feature(c_fixed_enum)`` to determine whether support for fixed
underlying types is available in C23 and later.
```
https://github.com/llvm/llvm-project/pull/117507
More information about the cfe-commits
mailing list