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

--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to N Schaeffer from comment #2)
> Do you have a suggestion concerning my last question:
> How can I check if x is NaN in a portable way (not presuming any compilation
> option) ?

This should bypass software optimizations. But if the hardware is put in a mode
that does strange things with NaN, it will be harder to work around.

int my_isnan(double x){
  volatile double y=x;
  return y!=y;
}

Reply via email to