pr49706.c
4.11 KB
-
re PR c/49706 (No warning for (!x > 1) which is always false) · 742938c9
PR c/49706 * doc/invoke.texi: Document -Wlogical-not-parentheses. c-family/ * c-common.c (warn_logical_not_parentheses): New function. * c-common.h (warn_logical_not_parentheses): Declare. * c.opt (Wlogical-not-parentheses): New option. c/ * c-typeck.c (parser_build_binary_op): Warn when logical not is used on the left hand side operand of a comparison. cp/ * parser.c (cp_parser_binary_expression): Warn when logical not is used on the left hand side operand of a comparison. testsuite/ * c-c++-common/pr49706.c: New test. From-SVN: r211255
Marek Polacek committed