c-common.c (warn_logical_not_parentheses): Print fixit hints.
authorMarek Polacek <polacek@redhat.com>
Thu, 25 Aug 2016 12:48:34 +0000 (12:48 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 25 Aug 2016 12:48:34 +0000 (12:48 +0000)
commitebef225f4d824e45982955fe2a3cceb4f8cbae0e
tree64f9fab13affc9a9f00a3ad4510b0ea04da7f713
parent30df8b9f1e45879851eca44923eb77b0099fa24e
c-common.c (warn_logical_not_parentheses): Print fixit hints.

* c-common.c (warn_logical_not_parentheses): Print fixit hints.
* c-common.h (warn_logical_not_parentheses): Update declaration.

* c-typeck.c (parser_build_binary_op): Pass LHS to
warn_logical_not_parentheses.

* parser.c (cp_parser_binary_expression): Pass LHS to
warn_logical_not_parentheses.

* c-c++-common/Wlogical-not-parentheses-2.c: New test.

Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
From-SVN: r239756
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wlogical-not-parentheses-2.c [new file with mode: 0644]