gcc:
commit99e82b02af9f161d5c291da873583e7398050b6a
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 Dec 2015 17:43:53 +0000 (4 17:43 +0000)
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 Dec 2015 17:43:53 +0000 (4 17:43 +0000)
tree73bbb14534693ad3de655a2066cd0059ac651d6b
parentf65ece8abe023cb769e5106e67f0d13f5b52c1a5
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231290 138bc75d-0d04-0410-961f-82ee72b054a4
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