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

--- Comment #8 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Vadim Zeitlin from comment #5)
> Perhaps you could consider this as a QoI issue, but it would be really great
> if gcc could give a warning if the code tries to use fesetround() without
> -frounding-math being on.

First note that even with -frounding-math, there are several bugs related to
rounding (maybe rint isn't considered pure, but operators like +-*/ are). Also,
there are ways (inline asm that hides optimization opportunities) to use
fesetround safely even with -fno-rounding-math (and it avoids the perf penalty
in places where we don't care about the rounding). Still, I guess we could
consider such a warning, if someone is willing to implement it...

Reply via email to