http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11393
--- Comment #23 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-10-26 00:16:00 UTC --- (In reply to comment #22) > (In reply to comment #21) > > In my opinion, floating point literals are allowed in constant expressions > > in > > the C++11 standard. > > They're only valid with 'constexpr' which isn't used in the testcases in this > PR (and can't be in C++98) Do you mean floating-point literals or in-class initializer for static data member of type 'const float'? In any case, clang seems to implement the most sane behaviour, no? g++ should do exactly the same, that is, accept the code with a pedwarn about "b" (either enabled by default or conditional in -Wpedantic), and do not warn or give an error about "c".