Uh oh!
There was an error while loading. Please reload this page.
bpo-46640: Py_NAN now uses the C99 NAN constant - #31134
Conversation
bedevere-bot
commented
Feb 5, 2022
🤖 New build scheduled with the buildbot fleet by @vstinner for commit bd6b0bcb748514702feb5f542f718fa97b6d9d39 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
vstinner
commented
Feb 5, 2022
test_urllib2 failed on many buildbots: https://bugs.python.org/issue36019 |
corona10
commented
Feb 5, 2022
That's true :( |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Building Python now requires a C99 <math.h> header file providing a NAN constant, or the __builtin_nan() built-in function. If a platform does not support Not-a-Number (NaN), the Py_NO_NAN macro can be defined in the pyconfig.h file.
vstinner
commented
Feb 5, 2022
I updated my PR:
|
vstinner
commented
Feb 5, 2022
For Python, a macro or function is the same. This change with this NEWS entry is already released: was moved to |
I looked at the machine code generated by The The It seems like clang creates a private variable at |
vstinner
commented
Feb 5, 2022
|
vstinner
commented
Feb 5, 2022
Using |
vstinner
commented
Feb 5, 2022
The Windows SDK defines these macros in ref: https://github.com/tpn/winsdk-10/blob/master/Include/10.0.16299.0/ucrt/corecrt_math.h It's similar to Python current definition of Py_NAN (simplified code):
|
| * Building Python now requires a C99 ``<math.h>`` header file providing | ||
| a ``NAN`` constant, or the ``__builtin_nan()`` built-in function. If a | ||
| platform does not support Not-a-Number (NaN), the ``Py_NO_NAN`` macro can be | ||
| defined in the ``pyconfig.h`` file. |
There was a problem hiding this comment.
It turns out that building under Py_NO_NAN doesn't actually work right now. I've opened an issue: https://bugs.python.org/issue46656
| @@ -56,24 +56,14 @@ | |||
| * doesn't support NaNs. | |||
There was a problem hiding this comment.
With this change, the comment about INF*0 or INF/INF working is out of date; that sentence should probably be removed.
mdickinson
left a comment
There was a problem hiding this comment.
Needs a comment update, but otherwise LGTM. It turns out that Py_NO_NAN doesn't actually work right now, but that's a separate issue.
vstinner
commented
Feb 6, 2022
Merged. Thanks for the review @mdickinson! |
Building Python now requires a C99 <math.h> header file providing the
NAN constant.
https://bugs.python.org/issue46640