From 59ea036456a663cb19a4f5a03c0643bd66f55b30 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Fri, 22 Aug 2014 19:44:27 +0000 Subject: re PR c++/62199 (ICE with -Wlogical-not-parentheses) 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. From-SVN: r214360 --- gcc/c/ChangeLog | 6 ++++++ gcc/c/c-typeck.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/c') diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 77bc05b..00fb275 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2014-08-22 Marek Polacek + + PR c++/62199 + * c-typeck.c (parser_build_binary_op): Adjust call to + warn_logical_not_parentheses. + 2014-08-22 Igor Zamyatin PR other/62008 diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c index d6d96cf..a7de8f3 100644 --- a/gcc/c/c-typeck.c +++ b/gcc/c/c-typeck.c @@ -3414,7 +3414,7 @@ parser_build_binary_op (location_t location, enum tree_code code, if (warn_logical_not_paren && code1 == TRUTH_NOT_EXPR && code2 != TRUTH_NOT_EXPR) - warn_logical_not_parentheses (location, code, arg1.value, arg2.value); + warn_logical_not_parentheses (location, code, arg2.value); /* Warn about comparisons against string literals, with the exception of testing for equality or inequality of a string literal with NULL. */ -- cgit v1.1