http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45829
--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2010-09-29 23:22:59 UTC --- (In reply to comment #7) > (In reply to comment #6) > > > > What is the point of allowing to initialize it then? > > Static const members declared with initializers can be used in constant > expressions, see 9.4.2p4 ... > (N.B. Allowing an in-class initializer for non-integral and non-enumeration > types in C++98 is a GCC extension. I believe it would be conforming, but is > not required, for "-a" to be evaluated at translation time, without requiring > a > definition of "a".) But -a (or 0.0-a) is not a constant expression, so having an in-class initializer seems suspicious, couldn't we warn at least? What happens if the definition is initialized to a different value?