From 25ff5dd35471b2b20f2b2681c8ff24c0d086ec00 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Mon, 5 Sep 2016 12:17:09 +0000 Subject: 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/doc/invoke.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/doc') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 73aab7c..9ab031e 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -5476,8 +5476,8 @@ if (a < 0 && a < 0) @{ @dots{} @} @opindex Wlogical-not-parentheses @opindex Wno-logical-not-parentheses Warn about logical not used on the left hand side operand of a comparison. -This option does not warn if the RHS operand is of a boolean type. Its -purpose is to detect suspicious code like the following: +This option does not warn if the right operand is considered to be a Boolean +expression. Its purpose is to detect suspicious code like the following: @smallexample int a; @dots{} -- cgit v1.1