[Bug c++/53745] Bitshifted value (1 << 31) within enumerator class is calculated incorrectly during compilation.
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 21 13:36:00 GMT 2012
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.
More information about the Gcc-bugs
mailing list