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

--- Comment #5 from Franz Sirl <sirl at gcc dot gnu.org> ---
Actually, after seeing a large bunch of justified warnings in our codebase with
the disabled APPEARS_TO_BE_BOOLEAN_EXPR_P check, I wonder if a new option like
-Wbool-bitwise-parentheses (thus not depending on the logical NOT) would make
sense?

Note that this is heavily influenced by my code reading/code debugging POV, I
really hate it if I need lots of context to decide whether a statement in a
codebase unknown to me is correct or not. A warning like
-Wbool-bitwise-parentheses encourages programmers to make their intention clear
from the start. Or, in the best case, even uncovers coding bugs or typos early.

Reply via email to