public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55095] New: Wshift-overflow
@ 2012-10-27  9:06 manu at gcc dot gnu.org
  2012-10-27 13:31 ` [Bug c++/55095] Wshift-overflow redi at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: manu at gcc dot gnu.org @ 2012-10-27  9:06 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55095

             Bug #: 55095
           Summary: Wshift-overflow
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: manu@gcc.gnu.org


From: http://blog.llvm.org/2011/05/c-at-google-here-be-dragons.html

const long kMaxDiskSpace = 10 << 30;  // Ten gigs ought to be enough for
anybody.

clang++ (no other options)
test.c:1:31: warning: signed shift result (0x280000000) requires 35 bits to
represent, but 'int' only has 32 bits [-Wshift-overflow]
const long kMaxDiskSpace = 10 << 30;  // Ten gigs ought to be enough for
anybody.
                           ~~ ^  ~~
1 warning generated.

g++ -Wall -Wextra -Wconversion:

silence. :-(


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-08-12 17:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-27  9:06 [Bug c++/55095] New: Wshift-overflow manu at gcc dot gnu.org
2012-10-27 13:31 ` [Bug c++/55095] Wshift-overflow redi at gcc dot gnu.org
2012-10-27 17:58 ` manu at gcc dot gnu.org
2012-10-27 18:40 ` redi at gcc dot gnu.org
2012-10-28  9:31 ` paolo.carlini at oracle dot com
2012-10-28 17:59 ` joseph at codesourcery dot com
2012-10-28 18:35 ` manu at gcc dot gnu.org
2014-09-11  7:13 ` dcb314 at hotmail dot com
2014-09-11 14:09 ` manu at gcc dot gnu.org
2015-05-25 14:49 ` mpolacek at gcc dot gnu.org
2015-07-20 13:44 ` mpolacek at gcc dot gnu.org
2015-07-20 13:46 ` mpolacek at gcc dot gnu.org
2015-07-29 15:16 ` dcb314 at hotmail dot com
2015-08-03 13:11 ` mpolacek at gcc dot gnu.org
2015-08-12 13:35 ` mpolacek at gcc dot gnu.org
2015-08-12 17:26 ` mpolacek at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).