[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-10-01 Thread STINNER Victor
STINNER Victor added the comment: The initial issue has been fixed in 3.8 and master. I close the issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-23 Thread STINNER Victor
STINNER Victor added the comment: Serhiy created bpo-38249: "Optimize out Py_UNREACHABLE in the release mode". -- ___ Python tracker ___

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset 245d439320e0921459502883fe809213e3b93e35 by Victor Stinner in branch '3.8': bpo-38205: Py_UNREACHABLE() calls Py_FatalError() (GH-16290) (GH-16306) https://github.com/python/cpython/commit/245d439320e0921459502883fe809213e3b93e35 --

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-20 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +15892 pull_request: https://github.com/python/cpython/pull/16306 ___ Python tracker ___

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset b1542583bee204130934c2b90684041e29378250 by Victor Stinner in branch 'master': bpo-38205: Py_UNREACHABLE() calls Py_FatalError() (GH-16290) https://github.com/python/cpython/commit/b1542583bee204130934c2b90684041e29378250 --

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-19 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +15875 pull_request: https://github.com/python/cpython/pull/16290 ___ Python tracker ___

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: _Py_NO_RETURN is a promise that the code past the function is unreachable, not that the function call is unreachable. > I'm not sure how __builtin_unreachable could be used with Py_UNREACHABLE() > macro. In the release mode Py_UNREACHABLE() can be

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-19 Thread Sergey Fedoseev
Sergey Fedoseev added the comment: FWIW I proposed to add Py_ASSUME() macro that uses __builtin_unreachable() in bpo-38147. -- ___ Python tracker ___

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-19 Thread STINNER Victor
STINNER Victor added the comment: > While it is a macro, it can be made a no-op, or even with compiler-specific > instructions like __builtin_unreachable. My PR 16280 uses _Py_NO_RETURN which uses __attribute__((__noreturn__)) with GCC and clang. I'm not sure how __builtin_unreachable

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I prefer to keep it a macro. The compiler does not know that it is never executed, so it can generate a suboptimal code. While it is a macro, it can be made a no-op, or even with compiler-specific instructions like __builtin_unreachable. This can help the

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-19 Thread STINNER Victor
STINNER Victor added the comment: I propose to restrict this issue to Py_UNREACHABLE() macro/function. Please use bpo-37812 to discuss longobject.c. -- ___ Python tracker

[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-09-19 Thread STINNER Victor
Change by STINNER Victor : -- title: Python no longer compiles without small integer singletons -> Py_UNREACHABLE() no longer behaves as a function call ___ Python tracker