https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106785
Aldy Hernandez <aldyh at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #10 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #8) > Well, __builtin_nan ("") == xxx is always false even with > -fno-finite-math-only, > including NaN == NaN, that is how floating point equality comparisons are > defined. > But, e.g. with -ffinite-math-only, we fold __builtin_isinf (x) or > __builtin_isnan (x) to 0 (maybe with the exception if you use __builtin_nan > ("") as its operand?; but that just shows that it is UB if NaNs or Infs can > appear at runtime). ok, we're good then. That's how I understand things as well.