================
@@ -470,8 +470,16 @@ static void InitializeStandardPredefinedMacros(const
TargetInfo &TI,
if (LangOpts.CPlusPlus26)
// FIXME: Use correct value for C++26.
Builder.defineMacro("__cplusplus", "202400L");
- else if (LangOpts.CPlusPlus23)
+ else if (LangOpts.CPlusPlus23) {
Builder.defineMacro("__cplusplus", "202302L");
+ // [C++23] 15.11p2 [cpp.predefined]
+ if (TI.hasFloat16Type()) {
+ Builder.defineMacro("__STDCPP_FLOAT16_T__", "1");
+ }
+ if (TI.hasFullBFloat16Type()) {
+ Builder.defineMacro("__STDCPP_BFLOAT16_T__", "1");
+ }
----------------
jcranmer-intel wrote:
If I'm understanding the code correctly, these don't get defined in C++26 mode,
which seems like a bug to me.
https://github.com/llvm/llvm-project/pull/78503
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits