From dc6229e8136143d84807a878908949c97b617bf2 Mon Sep 17 00:00:00 2001 From: mpolacek Date: Fri, 22 Aug 2014 19:44:27 +0000 Subject: PR c++/62199 * doc/invoke.texi: Update -Wlogical-not-parentheses description. c-family/ * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't check for vector types. Drop LHS argument. * c-common.h (warn_logical_not_parentheses): Adjust. c/ * c-typeck.c (parser_build_binary_op): Adjust call to warn_logical_not_parentheses. cp/ * parser.c (cp_parser_binary_expression): Check each LHS if it's preceded with logical not. Adjust call to warn_logical_not_parentheses. testsuite/ * c-c++-common/pr62199.c: New test. * c-c++-common/pr62199-2.c: New test. * g++.dg/warn/Wparentheses-25.C: Drop XFAILs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214360 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 f8499bc046a..dda8e91250c 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -4776,8 +4776,8 @@ bit-wise operator is likely to be expected. @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 LHS or RHS operand is of a boolean or -a vector type. Its purpose is to detect suspicious code like the following: +This option does not warn if the RHS operand is of a boolean type. Its +purpose is to detect suspicious code like the following: @smallexample int a; @dots{} -- cgit v1.2.1