[PATCH] D131255: Fix Wbitfield-constant-conversion on 1-bit signed bitfield
Bjorn Pettersson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 16 05:30:40 PDT 2022
bjope added a comment.
FWIW, just some things noticed when I examined some of the new warning that popped up after this patch:
https://github.com/llvm/llvm-project/issues/53253 mentioned that for example gcc complained about this. Although, as shown here https://godbolt.org/z/bq34Kexac there are some other differences that clang now complains already with -Wall, but that is not the case with gcc (I think one need to enable `-Wpedantic` in gcc to get a warning about signed overflow).
A similar warning (when assigning -1 to an unsigned bitfield) can be given by both gcc and clang by using ` -Wsign-conversion` but that is not part of `-Wall` either. But maybe that is a totally different thing.
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