re PR c/81783 (-Wtautological-compare could do better)
authorMarek Polacek <polacek@redhat.com>
Mon, 4 Sep 2017 14:05:01 +0000 (14:05 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 4 Sep 2017 14:05:01 +0000 (14:05 +0000)
commitbc7fe95200214ce70419fde6f965dc88bbd645a6
treeece5a8c4fb2b7d91d89c483d88f20c4058b89390
parent8713d0f1c46f81107ea61781e2f4dc918d0fb67d
re PR c/81783 (-Wtautological-compare could do better)

PR c/81783
* c-warn.c (warn_tautological_bitwise_comparison): New function.
(warn_tautological_cmp): Call it.

* doc/invoke.texi: Update -Wtautological-compare documentation.

* c-c++-common/Wtautological-compare-5.c: New test.

From-SVN: r251660
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-warn.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wtautological-compare-5.c [new file with mode: 0644]