should we add #pragma STDC FENV_ACCESS ON ?
#pragma STDC FENV_ACCESS ON tells the compiler that the rounding mode might not be the default one. Should we add it in addition to -frounding-mode? Note that this pragma is not implemented in gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34678.
With the attached file:
zimmerma@tomate:/tmp$ ./a.out
FE_TONEAREST: inf
FE_TOWARDZERO: inf
FE_UPWARD: inf
FE_DOWNWARD: inf
zimmerma@tomate:/tmp$ clang -O1 -frounding-math e.c -lm
zimmerma@tomate:/tmp$ ./a.out
FE_TONEAREST: inf
FE_TOWARDZERO: 0x1.fffffep+127
FE_UPWARD: inf
FE_DOWNWARD: 0x1.fffffep+127