[Bug c/57029] GCC doesn't set the inexact flag on inexact compile-time int-to-float conversion

2021-10-28 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57029

--- Comment #4 from Richard Biener  ---
PR84407 was related which was about rounding modes and int-to-float conversion
which means the testcase in this bug should now also be fixed if you supply
-frounding-math which is documented as to determine the default of
#pragma STDC FENV_ACCESS when the latter is implemented.

But yes, -ftrapping-math is not enough to preserve the conversions from being
constant folded (and thus the exception being lost).  Not sure if separate
control of this is really desirable.

[Bug c/57029] GCC doesn't set the inexact flag on inexact compile-time int-to-float conversion

2013-04-22 Thread rguenth at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57029



Richard Biener rguenth at gcc dot gnu.org changed:



   What|Removed |Added



 Status|UNCONFIRMED |NEW

   Last reconfirmed||2013-04-22

 Ever Confirmed|0   |1



--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org 2013-04-22 
13:01:09 UTC ---

There is no -finexact-math flag similar to -frounding-math we could guard

such transforms with.  Certainly the default of that flag is 'off' by

design, similar to -frounding-math.


[Bug c/57029] GCC doesn't set the inexact flag on inexact compile-time int-to-float conversion

2013-04-22 Thread glisse at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57029



--- Comment #2 from Marc Glisse glisse at gcc dot gnu.org 2013-04-22 13:07:07 
UTC ---

There is -ftrapping-math, which I think is supposed to have an effect here. And

if this was implemented properly, I hope it would be turned off by default.


[Bug c/57029] GCC doesn't set the inexact flag on inexact compile-time int-to-float conversion

2013-04-22 Thread vincent-gcc at vinc17 dot net

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57029

--- Comment #3 from Vincent Lefèvre vincent-gcc at vinc17 dot net 2013-04-22 
13:32:10 UTC ---
(In reply to comment #2)
 There is -ftrapping-math, which I think is supposed to have an effect here. 
 And
 if this was implemented properly, I hope it would be turned off by default.

-ftrapping-math is on by default. And whether -ftrapping-math or
-fno-trapping-math is used, the behavior is the same.