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

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
Thank you for this very detailed analysis :-)

(In reply to jos...@codesourcery.com from comment #1)
> * If not all values of the integer type can be represented in the 
> floating-point type exactly, then the change to an integer comparison 
> would lose an "inexact" exception, so not be appropriate with 
> -ftrapping-math (strictly interpreted; GCC may not follow that 
> consistently).

Indeed. Note that I believe splitting -ftrapping-math=(no|normal|strict), or
maybe even further (I know some people using overflow, but noone who uses the
inexact exception, although there must be a few) would help convince people to
add those checks (I abandoned PR 53805 and PR 53806 in part because it wasn't
clear which one was wanted), and so would making -fno-trapping-math the default
(PR 54192), so we don't fear regressing code speed for default users who don't
care.

Reply via email to