graphene
graphene copied to clipboard
Don't use obsolete isinff and isnanf functions
GNU libc already marks isinff and isnanf functions as obsolete. They have been replaced by isinf and isnan macros defined by C99. Since we already requires C99 in this project, it should be nice if we can switch to standard macros.
Proposed changes:
- Drop the use of non-standard and obsolete isinff and isnanf functions.
Benchmark results:
- None
Test suite changes:
- None
It currently fails with GCC __builtin_isinf
when -O1 or higher is used. I haven't found out why it fails. It works with Clang __builtin_isinf
and FreeBSD libc. GNU libc just defines isinf
as __builtin_isinf
.
I initially used isinf()
and isnan()
, but those ended up breaking when using GCC because it tried to promote float
s to double
s, and the results wouldn't match any more—especially when using GCC vectorisation.
It could very well be a bug in GCC.