[Bug c/92875] GCC ignores the floating-point 'f' suffix in C11 mode
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Mon Dec 9 22:41:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92875
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
The value of FLT_EVAL_METHOD applies to constants as well as to
operations. That is, when FLT_EVAL_METHOD == 2, 0.1f has the precision of
long double but the semantic type of float, and 0.1 has the precision of
long double but the semantic type of double. An explicit cast to float
removes excess precision. This is as specified in the C standard.
More information about the Gcc-bugs
mailing list