[Bug c/71852] add warning for conditions that can never be true (missed -Wtautological-compare?)

egallager at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 12 12:21:30 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71852

--- Comment #4 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Eric Gallager from comment #3)
> Confirmed, I would've thought Marek's recent changes to
> -Wtautological-compare would have gotten this, but guess not...

Can someone help me remember which commit(s) I was referring to when saying
"Marek's recent changes" here? I'm trying to craft a preprocessor conditional
for disabling -Wtautological-compare for a similar case as this, but am
forgetting in which version of GCC this particular kind of bitwise comparison
warning was added to -Wtautological-compare... on a side note, maybe the
bitwise comparison warnings could be split off from -Wtautological-compare into
a separate subflag (-Wtautological-bitwise-compare perhaps?) so they can be
toggled separately?


More information about the Gcc-bugs mailing list