[clang] [Clang] [C23] Implement N2653: u8 strings are char8_t[] (PR #97208)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 6 07:00:11 PDT 2024
================
@@ -1165,6 +1165,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
DefineType("__WCHAR_TYPE__", TI.getWCharType(), Builder);
DefineType("__WINT_TYPE__", TI.getWIntType(), Builder);
DefineTypeSizeAndWidth("__SIG_ATOMIC", TI.getSigAtomicType(), TI, Builder);
+ if (LangOpts.Char8 || LangOpts.C23)
+ DefineType("__CHAR8_TYPE__", TI.UnsignedChar, Builder);
----------------
cor3ntin wrote:
I'm certainly concerned with the impact of that in C++. It should not be defined in C++ (ie, char9_t is not unsigned char in C++)
https://github.com/llvm/llvm-project/pull/97208
More information about the cfe-commits
mailing list