Message412581
> The big blocker here is that a platform that fully supports C99 might not define the "NAN" macro. I don't think we can require that NAN be defined in order for Python to build (which is what the PR currently does, if I'm understanding it correctly).
If a platform doesn't implement NaN, it should define the Py_NO_NAN macro:
/* Py_NAN
* A value that evaluates to a NaN. On IEEE 754 platforms INF*0 or
* INF/INF works. Define Py_NO_NAN in pyconfig.h if your platform
* doesn't support NaNs.
*/
#if !defined(Py_NAN) && !defined(Py_NO_NAN)
// Use C99 "NAN" constant: quiet Not-A-Number (when supported)
# define Py_NAN NAN
#endif
Or do you mean that a platform can support NaN but don't define the <math.h> NAN macro? |
|
Date |
User |
Action |
Args |
2022-02-05 16:42:34 | vstinner | set | recipients:
+ vstinner, tim.peters, rhettinger, mark.dickinson, r.david.murray |
2022-02-05 16:42:34 | vstinner | set | messageid: <1644079354.76.0.516488002368.issue46640@roundup.psfhosted.org> |
2022-02-05 16:42:34 | vstinner | link | issue46640 messages |
2022-02-05 16:42:34 | vstinner | create | |
|