https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70731

--- Comment #2 from Josh Triplett <josh at joshtriplett dot org> ---
(In reply to Marc Glisse from comment #1)
> That... seems dangerous to me. With floats, unsafe operations tend to change
> the low bits. With integers, an overflow gets the high bits wrong. If you
> call test(INT_MAX,0,1,0) for instance, the result would be quite different
> between the 2 functions...

That's a fair point.  Perhaps it should go into a separate optimization option,
then, though it still seems in the spirit of -Ofast.  (If overflow is a
concern, the application would hopefully be checking for that separately; GCC
also already has various optimizations that assume overflow cannot occur.)

Reply via email to