[clang] [Clang] Fix oversized bit-field layout on big-endian targets (PR #225494)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 29 05:09:20 PDT 2026
================
@@ -15917,12 +15917,15 @@ struct PaddingCalculator {
const uint64_t DeclaredSizeInBits = Field->getBitWidthValue();
- // Handle over-sized bitfields:
- // unsigned char a : 12;
- // In this case, DeclaredSizeInBits is 12, but the actually occupied bit
- // size is 8, while the remaining 4 bits are padding.
+ // Oversized bit-fields (declared width larger than the field type) keep
+ // only the type's width as the value container. The extra declared bits
+ // are padding and follow that container (Itanium C++ ABI 2.4).
----------------
xiongzile wrote:
Sorry I missed it. Now the entire reference is added
https://github.com/llvm/llvm-project/pull/225494
More information about the cfe-commits
mailing list