This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/55095] Wshift-overflow


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]