[PATCH] D131255: Fix Wbitfield-constant-conversion on 1-bit signed bitfield
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 29 07:12:02 PDT 2022
aaron.ballman added a comment.
In D131255#3729304 <https://reviews.llvm.org/D131255#3729304>, @aaron.ballman wrote:
> After some more thought and some offline discussions, I think I have a reasonable way forward: let's add `-Wsingle-bit-bitfield-constant-conversion` as a new warning group under `-Wbitfield-constant-conversion` that controls the diagnostic for one-bit bitfields. The diagnostic behavior here is pedantically correct and will help catch some bugs for folks, but there's enough existing code using `1` and not misbehaving (probably because they're not inspecting the value except in a boolean context) that having separate control seems useful.
>
> What do others think?
I went ahead and posted https://reviews.llvm.org/D132851.
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