[Bug c++/55095] Wshift-overflow
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Aug 12 17:26:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55095
--- Comment #19 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Wed Aug 12 17:25:23 2015
New Revision: 226826
URL: https://gcc.gnu.org/viewcvs?rev=226826&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/c-c++-common/Wshift-overflow-6.c
trunk/gcc/testsuite/c-c++-common/Wshift-overflow-7.c
trunk/gcc/testsuite/g++.dg/cpp1y/left-shift-2.C
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list