[PATCH] D126364: Fix interaction of pragma FENV_ACCESS with other pragmas
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 6 11:21:02 PDT 2022
efriedma added a comment.
In D126364#3560984 <https://reviews.llvm.org/D126364#3560984>, @sepavloff wrote:
> In D126364#3560877 <https://reviews.llvm.org/D126364#3560877>, @efriedma wrote:
>
>> Shouldn't the rounding mode be FE_DYNAMIC by default?
>
> According to the standard it must be FE_TONEAREST:
>
> F.8.3p1:
> At program startup the dynamic floating-point environment is initialized as prescribed by IEC 60559:
> ...
> - The dynamic rounding direction mode is rounding to nearest.
> ...
When I say the default should be FE_DYNAMIC, I'm talking about the default FENV_ROUND state. That's talking about the initial state of the floating-point registers at runtime (on entry to main()).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126364/new/
https://reviews.llvm.org/D126364
More information about the cfe-commits
mailing list