]> git.xonotic.org Git - xonotic/darkplaces.git/commit
Another flag bites the dust. This time: -ffinite-math-only.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 22 Feb 2020 03:47:48 +0000 (03:47 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 22 Feb 2020 03:47:48 +0000 (03:47 +0000)
commitf96918f02808e35a2cd94885003c24a145be5bb9
tree916c6fe007d3bcc06e206f7dad6badc374c4929b
parent87314e465dcdcda289a9e1a791011948813a59d3
Another flag bites the dust. This time: -ffinite-math-only.

Since GCC 5, with this flag set, NaN compares equal to zero in some cases but
not others. Causes e.g. "attempted division by zero" error spam from this QC
code:

float x = nan("");
if (x == 0) {
  return 0;
}
return 1.0 / x;

Yes, those NaNs should not be happening in the first place, but suddenly
passing some but not all equality checks to zero seems rather dangerous.

Reference: issue #2412 (not a fix for it; the QC code has a problem too but
this change helps track it down properly).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12522 d7cf8633-e32d-0410-b094-e92efae38249
makefile
makefile.inc