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

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |87403
            Summary|-Wparentheses unexpectedly  |-Wparentheses unexpectedly
                   |misses some cases           |misses some cases
                   |                            |[-Wbool-bitwise-parentheses
                   |                            |]

--- Comment #6 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Franz Sirl from comment #5)
> 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.

Making this block the "new-warning" bug then


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87403
[Bug 87403] [Meta-bug] Issues that suggest a new warning

Reply via email to