re PR c/77423 (-Wlogical-not-parentheses false positive for bitwise expression with...
authorMarek Polacek <polacek@redhat.com>
Mon, 5 Sep 2016 12:17:09 +0000 (12:17 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 5 Sep 2016 12:17:09 +0000 (12:17 +0000)
commit25ff5dd35471b2b20f2b2681c8ff24c0d086ec00
treecbe9638e9cb6159d1a15ccd556a01d2ef8a445c8
parentc5cb79681df13acc02894b4df8314c797895e2bb
re PR c/77423 (-Wlogical-not-parentheses false positive for bitwise expression with _Bool operands)

PR c/77423
* doc/invoke.texi: Update -Wlogical-not-parentheses documentation.

* c-common.c (bool_promoted_to_int_p): New function.
(expr_has_boolean_operands_p): New function.
(warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
(maybe_warn_bool_compare): Use bool_promoted_to_int_p.

* c-c++-common/Wlogical-not-parentheses-3.c: New test.

From-SVN: r239988
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wlogical-not-parentheses-3.c [new file with mode: 0644]