https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63886
--- Comment #11 from Eric Gallager <egall at gwmail dot gwu.edu> --- (In reply to Manuel López-Ibáñez from comment #10) > (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 About the ones where you wrote "(not sure why!)", it's asking the programmer to add the nonstandard "d" suffix, which is a GNU extension. This has led projects to ignore the warning: https://lists.gnu.org/archive/html/bug-gzip/2011-11/msg00017.html But I suppose that's an issue for a separate bug.