[PATCH] D131255: Fix Wbitfield-constant-conversion on 1-bit signed bitfield
Shawn Zhong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 5 07:02:17 PDT 2022
ShawnZhong added a comment.
Thanks for the quick reply and the reference on the C standard!
On the C++ side, Section C.1.8 specified that `int` bit-fields are signed:
> Change: Bit-fields of type plain int are signed.
> Rationale: Leaving the choice of signedness to implementations could lead to inconsistent definitions of template specializations. For consistency, the implementation freedom was eliminated for non-dependent types, too.
> Effect on original feature: The choise is implementation-defined in C, but not so in C++.
Implementation-wise, I'll see what I can find in CodeGen on whether `int` bit-fields are signed for C
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131255/new/
https://reviews.llvm.org/D131255
More information about the cfe-commits
mailing list