]> gcc.gnu.org Git - gcc.git/commit - gcc/c-family/ChangeLog
re PR c++/55095 (Wshift-overflow)
authorMarek Polacek <polacek@redhat.com>
Wed, 12 Aug 2015 17:25:23 +0000 (17:25 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 12 Aug 2015 17:25:23 +0000 (17:25 +0000)
commitb893e375096038ac99521a97b7fa346b016bdb78
tree61fb3ae13f36228936da84dc60d9e477d727f37e
parentbb2978b8fd41165054ffe3cfcfa5311fffaf13cd
re PR c++/55095 (Wshift-overflow)

PR c++/55095
* c-common.c (maybe_warn_shift_overflow): Properly handle
left-shifting 1 into the sign bit.

* c-c++-common/Wshift-overflow-6.c: New test.
* c-c++-common/Wshift-overflow-7.c: New test.
* g++.dg/cpp1y/left-shift-2.C: New test.

From-SVN: r226826
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wshift-overflow-6.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/Wshift-overflow-7.c [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/left-shift-2.C [new file with mode: 0644]
This page took 0.055883 seconds and 5 git commands to generate.