[clang] [C23] Fixed the value of BOOL_WIDTH (PR #117364)
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 22 11:34:30 PST 2024
================
@@ -1103,7 +1103,15 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far");
Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth()));
- Builder.defineMacro("__BOOL_WIDTH__", Twine(TI.getBoolWidth()));
+ // The macro is specifying the number of bits in the value representation,
----------------
zygoloid wrote:
It's the width, not the number of bits in the value representation (which in C++'s definition of "value representation" would be 8, because all 8 bits affect the determination of the value and whether that value is valid).
https://github.com/llvm/llvm-project/pull/117364
More information about the cfe-commits
mailing list