[clang] Implementation of '#pragma STDC FENV_ROUND' (PR #89617)

Serge Pavlov via cfe-commits cfe-commits at lists.llvm.org
Mon May 13 05:14:28 PDT 2024


spavloff wrote:

> 7.6.2p4 does clearly state that floating constants need to be evaluated according to the standard rounding mode, so that the constant 0.1 evaluates to a different value in FE_DOWNWARD versus FE_UPWARD.

Treatment of floating-point constants is fixed in https://github.com/llvm/llvm-project/pull/90877.

> I'm not seeing from the tests how the code is handling calls to functions. Calls to all functions outside of a finite list (see same paragraph) need to restore the saved dynamic rounding mode for the duration of the call.

The latest update to this PR fixes this.

https://github.com/llvm/llvm-project/pull/89617


More information about the cfe-commits mailing list