[Bug middle-end/60540] Don't convert int to float when comparing int with float (double) constant

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Mon Mar 17 15:20:00 GMT 2014


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

--- Comment #4 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Sat, 15 Mar 2014, harald at gigawatt dot nl wrote:

> Only if the int is out of float's range. If the int is in float's range, but
> merely cannot be represented exactly, the value is rounded. Whether it is

With -ftrapping-math (default) you also need to allow for "inexact" 
exceptions.  See bug 57371 for more discussion.



More information about the Gcc-bugs mailing list