https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63886
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |easyhack --- Comment #10 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Eric Gallager from comment #8) > (In reply to Andreas Schwab from comment #4) > > float f = 3.1f; > > Isn't there already -Wunsuffixed-float-constants for warnings with that kind > of fix? -Wfloat-conversion is not warning about the lack of suffix, but about the fact that 3.1 does not fit into a double (3.5 does, so there is no warning). float f; double d; f = 3.100000000000000088817841970012523233890533447265625; // -Wfloat-conversion -Wunsuffixed-float-constants d = 3.100000000000000088817841970012523233890533447265625; // -Wunsuffixed-float-constants (not sure why!) f = 3.5; // -Wunsuffixed-float-constants d = 3.5; // -Wunsuffixed-float-constants (not sure why!) f = 3.1f; // no warning d = 3.1f; // no warning