[PATCH] D126364: Fix interaction of pragma FENV_ACCESS with other pragmas

Serge Pavlov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 6 11:25:11 PDT 2022


sepavloff added a comment.

In D126364#3560997 <https://reviews.llvm.org/D126364#3560997>, @efriedma wrote:

> 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()).

The cited excerpt from the standard is just about floating point environment at program startup.


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