c-common.c (maybe_warn_shift_overflow): Warn on all overflows if shifting 1 out of...
authorPaolo Bonzini <bonzini@gnu.org>
Fri, 4 Dec 2015 17:43:53 +0000 (17:43 +0000)
committerPaolo Bonzini <bonzini@gcc.gnu.org>
Fri, 4 Dec 2015 17:43:53 +0000 (17:43 +0000)
commitc5404f1c2fc79761392acf49af2c46079d907756
tree73bbb14534693ad3de655a2066cd0059ac651d6b
parent755be51d0266bc008def4de484cc9c7803283d69
c-common.c (maybe_warn_shift_overflow): Warn on all overflows if shifting 1 out of the sign bit.

gcc:
2015-12-04  Paolo Bonzini  <bonzini@gnu.org>

* c-family/c-common.c (maybe_warn_shift_overflow): Warn on all
overflows if shifting 1 out of the sign bit.

gcc/testsuite:
2015-12-04  Paolo Bonzini  <bonzini@gnu.org>

* c-c++-common/Wshift-overflow-1.c: Test shifting 1 out of the sign bit.
* c-c++-common/Wshift-overflow-2.c: Test shifting 1 out of the sign bit.
* c-c++-common/Wshift-overflow-3.c: Test shifting 1 out of the sign bit.
* c-c++-common/Wshift-overflow-4.c: Test shifting 1 out of the sign bit.
* c-c++-common/Wshift-overflow-6.c: Test shifting 1 out of the sign bit.
* c-c++-common/Wshift-overflow-7.c: Test shifting 1 out of the sign bit.

From-SVN: r231290
gcc/ChangeLog
gcc/c-family/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wshift-overflow-1.c
gcc/testsuite/c-c++-common/Wshift-overflow-2.c
gcc/testsuite/c-c++-common/Wshift-overflow-3.c
gcc/testsuite/c-c++-common/Wshift-overflow-4.c
gcc/testsuite/c-c++-common/Wshift-overflow-6.c
gcc/testsuite/c-c++-common/Wshift-overflow-7.c