[clang] Implementation of '#pragma STDC FENV_ROUND' (PR #89617)
Joshua Cranmer via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 26 13:22:35 PDT 2024
https://github.com/jcranmer-intel requested changes to this pull request.
I haven't fully tested the changes yet, so right now I'm looking at the test to figure out how much is supported. Nevertheless, I can already tell that this is not complete support.
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`.
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.
I'd like to see tests covering casts and conversions better.
https://github.com/llvm/llvm-project/pull/89617
More information about the cfe-commits
mailing list