re PR c/80525 (-Wlogical-op confused by undefined integer overflow)
authorMarek Polacek <polacek@redhat.com>
Tue, 9 May 2017 11:21:14 +0000 (11:21 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 9 May 2017 11:21:14 +0000 (11:21 +0000)
commit684f84dea9cb2acf6c61bf461a9d50f6b7c03eca
tree16e450b9cd928ae252b2eb7bf2db23dc8cbacb15
parent641da50a0c73f734e672f8e6b9e7d2c86bde840d
re PR c/80525 (-Wlogical-op confused by undefined integer overflow)

PR c/80525
* c-warn.c (unwrap_c_maybe_const): New.
(warn_logical_operator): Call it.

* c-c++-common/Wlogical-op-1.c: Don't use -fwrapv anymore.
* c-c++-common/Wlogical-op-2.c: New test.

From-SVN: r247786
gcc/c-family/ChangeLog
gcc/c-family/c-warn.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wlogical-op-1.c
gcc/testsuite/c-c++-common/Wlogical-op-2.c [new file with mode: 0644]