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++/53745] Bitshifted value (1 << 31) within enumerator class is calculated incorrectly during compilation.


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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-06-21 13:36:24 UTC ---
The initializer must be converted constant expression of type unsigned long, so
by my reading it's ill-formed because (1<<31) has type int and is negative so
requires a narrowing conversion to unsigned long.


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