[Bug c++/49896] undefined reference to static const integral member whose address is not used, for some values of the constant

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jul 30 12:10:00 GMT 2011


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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-07-30 12:09:28 UTC ---
The initializer results in integer overflow which is undefined behaviour, so if
G++ accepts it but requires the variable to be defined then that is a
reasonable result.

The modified example shouldn't cause an ICE, that's a regression, but it seems
to be fixed in 4.7 already



More information about the Gcc-bugs mailing list