================
@@ -1342,8 +1342,10 @@ static void InitializePredefinedMacros(const TargetInfo 
&TI,
                       getLockFreeValue(TI.get##Type##Width(), TI));
     DEFINE_LOCK_FREE_MACRO(BOOL, Bool);
     DEFINE_LOCK_FREE_MACRO(CHAR, Char);
-    if (LangOpts.Char8)
-      DEFINE_LOCK_FREE_MACRO(CHAR8_T, Char); // Treat char8_t like char.
+    // char8_t has the same representation / width as unsigned
+    // char in C++ and is a typedef for unsigned char in C23
+    if (LangOpts.Char8 || LangOpts.C23)
----------------
MitalAshok wrote:

Looks like that also controls if `char8_t` is a keyword/builtin type, which it 
isn't in C23. (`LangOpts.Char8` is also false in C++20 with `-fno-char8_t`)

https://github.com/llvm/llvm-project/pull/97208
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to