pr49706.c
7.91 KB
-
re PR c/65120 (Wlogical-not-parentheses should not warn about double exclamation !!) · 7ccb1a11
PR c/65120 * c-common.c (warn_logical_not_parentheses): Don't warn for !x == 0 or !x != 0. * c-typeck.c (parser_build_binary_op): Check for tcc_comparison before preparing arguments to warn_logical_not_parentheses. * parser.c (cp_parser_binary_expression): Check for tcc_comparison before preparing arguments to warn_logical_not_parentheses. Use maybe_constant_value on rhs. * c-c++-common/pr49706.c (fn2): Don't expect warning if enumerator on rhs is 0. (fn4): New test. * c-c++-common/pr65120.c: New test. From-SVN: r221299
Jakub Jelinek committed