[Bug c++/52956] New: Missing overflow warning
xinliangli at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Apr 12 21:59:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52956
Bug #: 52956
Summary: Missing overflow warning
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: xinliangli@gmail.com
static const long long
DiskCacheSize = 8 << 30; // 8 Gigs
/*
overflow.cpp:1:42: warning: signed shift result (0x200000000) requires 35
bits to represent, but 'int' only has 32 bits [-Wshift-overflow]
static const long long DiskCacheSize = 8 << 30; // 8 Gigs
~ ^ ~~
1 warning generated.
*/
More information about the Gcc-bugs
mailing list