[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1b2611eb0283055835e5df632a7a735db8c894b8 by Victor Stinner in branch 'main': bpo-46656: Remove Py_NO_NAN macro (GH-31160) https://github.com/python/cpython/commit/1b2611eb0283055835e5df632a7a735db8c894b8 -- ___

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5f8b5e2f2150d2223ff9e286bd146de92ff16865 by Victor Stinner in branch 'main': bpo-46656: Building Python now requires a C11 compiler (GH-31557) https://github.com/python/cpython/commit/5f8b5e2f2150d2223ff9e286bd146de92ff16865 -- __

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29679 pull_request: https://github.com/python/cpython/pull/31557 ___ Python tracker ___ __

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-08 Thread STINNER Victor
STINNER Victor added the comment: Requiring IEEE 754 support is being discussed on python-dev: https://mail.python.org/archives/list/python-...@python.org/thread/J5FSP6J4EITPY5C2UJI7HSL2GQCTCUWN/ -- ___ Python tracker

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-06 Thread Mark Dickinson
Mark Dickinson added the comment: > See the explanations in the source. Hmm. Those explanations made more sense before PR GH-28882. :-( -- ___ Python tracker ___

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-06 Thread Mark Dickinson
Mark Dickinson added the comment: > Is the macro PY_NO_SHORT_FLOAT_REPR also related to platforms which don't > support IEEE 754? Yes, though it's a bit more than that: we also need the platform either not to have issues with double rounding for normal numbers, or we need to be able to cont

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-06 Thread STINNER Victor
STINNER Victor added the comment: Is the macro PY_NO_SHORT_FLOAT_REPR also related to platforms which don't support IEEE 754? In 2022, which platforms don't support IEEE 754? -- ___ Python tracker

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-06 Thread Mark Dickinson
Mark Dickinson added the comment: Okay, the comments I made on #46640 still apply (even though they didn't properly apply on that issue). I think this needs a python-dev discussion before it can be moved forward - requiring the existence of NaNs is very close to requiring IEEE 754 floating-p

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-06 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-46640 "Python can now use the C99 NAN constant or __builtin_nan()". -- ___ Python tracker ___ __

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-06 Thread STINNER Victor
STINNER Victor added the comment: If someone suddenly requires platforms without NaN support, they can maintain a (downstream) patch, or we can revert the change in Python. -- ___ Python tracker ___

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-06 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +29333 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31160 ___ Python tracker ___ _

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-06 Thread STINNER Victor
STINNER Victor added the comment: Python uses Py_NAN without "#ifdef Py_NAN" guard since 2008. Building Python with Py_NO_NAN never worked. Nobody reported such build failure in the last 14 years... IMO it's time to stop supporting platforms without NaN support. > Objects/complexobject.c:1

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-06 Thread Mark Dickinson
Mark Dickinson added the comment: Here's the first point of failure on my machine. Fixing this shows up more failures. gcc -c -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror

[issue46656] Compile fails if Py_NO_NAN is defined

2022-02-06 Thread Mark Dickinson
New submission from Mark Dickinson : The macro Py_NAN may or may not be defined: in particular, a platform that doesn't have NaNs is supposed to be able to define Py_NO_NAN in pyport.h to indicate that. But not all of our uses of `Py_NAN` are guarded by suitable #ifdef conditionals. As a res