[Bug c/92875] GCC ignores the floating-point 'f' suffix in C11 mode

anders at wahrzeichnen dot de gcc-bugzilla@gcc.gnu.org
Mon Dec 9 23:19:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92875

--- Comment #6 from anders at wahrzeichnen dot de <anders at wahrzeichnen dot de> ---
(In reply to joseph@codesourcery.com from comment #3)
> This is as specified in the C standard.

I guess you are referring to the C18 section

  6.3.1.8 (2) "The values of floating operands and of the results of floating
expressions may be represented in greater range and precision than that
required by the type; the types are not changed thereby. --footnote: The cast
and assignment operators are still required to remove extra range and
precision."

in conjunction with

  6.6 (5) "An expression that evaluates to a constant is required in several
contexts. If a floating expression is evaluated in the translation environment,
the arithmetic range and precision shall be at least as great as if the
expression were being evaluated in the execution environment. --footnote: The
use of evaluation formats as characterized by FLT_EVAL_METHOD also applies to
evaluation in the translation environment."

If so, I propose to close this bug (as __FLT_EVAL_METHOD__ is indeed 2).


More information about the Gcc-bugs mailing list