------- Comment #2 from rguenth at gcc dot gnu dot org  2007-10-12 14:38 -------
No, -pedantic gives an error.  -pedantic -fpermissive gives a warning on the
initialization but still an error on the FP literal:

tmp> g++-4.3 -c t.C  

tmp> g++-4.3 -c t.C -pedantic
t.C:3: error: floating-point literal cannot appear in a constant-expression
t.C:3: error: ISO C++ forbids initialization of member constant 'bar' of
non-integral type 'const float'

tmp> g++-4.3 -c t.C -pedantic -fpermissive
t.C:3: error: floating-point literal cannot appear in a constant-expression
t.C:3: warning: ISO C++ forbids initialization of member constant 'bar' of
non-integral type 'const float'


so I cannot get only warnings for this.


-- 


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

Reply via email to