[issue43615] [PATCH] Properly implement Py_UNREACHABLE macro using autoconf.

2021-03-24 Thread Cong Ma
Cong Ma added the comment: > If you consider that there is a bug, please open a new issue since you closed > this one. Please see the follow up in Issue 43617. Many thanks for bearing with me. -- ___ Python tracker

[issue43615] [PATCH] Properly implement Py_UNREACHABLE macro using autoconf.

2021-03-24 Thread STINNER Victor
STINNER Victor added the comment: > BTW, do we need to fix the missing definition of the AX_CHECK_COMPILE_FLAG > macro in configure.ac? This is a separate problem, if a problem at all. I'm not sure which problem you are trying to solve. If you consider that there is a bug, please open a new

[issue43615] [PATCH] Properly implement Py_UNREACHABLE macro using autoconf.

2021-03-24 Thread STINNER Victor
STINNER Victor added the comment: > The headers Python.h and also the ones pulled in by it were actually from > Python 3.8 release, which unconditionally defines the macro as a call to > Py_FatalError. Using __builtin_unreachable() is a recent change (bpo-38249), Python 3.9.0: * commit eeba

[issue43615] [PATCH] Properly implement Py_UNREACHABLE macro using autoconf.

2021-03-24 Thread Cong Ma
Cong Ma added the comment: BTW, do we need to fix the missing definition of the AX_CHECK_COMPILE_FLAG macro in configure.ac? This is a separate problem, if a problem at all. -- resolution: -> not a bug stage: -> resolved status: open -> closed __

[issue43615] [PATCH] Properly implement Py_UNREACHABLE macro using autoconf.

2021-03-24 Thread Cong Ma
Cong Ma added the comment: Hello Victor, I think you're right. This is bogus on my part. TL;DR: The Python version is 3.8 but I was trying to understand what's going on using the latest source. Full version: I was trying to understand why the following C file when compiled with -shared usin

[issue43615] [PATCH] Properly implement Py_UNREACHABLE macro using autoconf.

2021-03-24 Thread STINNER Victor
STINNER Victor added the comment: > The current implementation tests the ``__GNUC__`` and ``__GNUC_MINOR__`` > macros as the logic (GCC version >= 4.5) for determining whether the compiler > intrinsic ``__builtin_unreachable()`` is present (see commits eebaa9bf, > 24ba3b0d). However, Clang d

[issue43615] [PATCH] Properly implement Py_UNREACHABLE macro using autoconf.

2021-03-24 Thread Cong Ma
New submission from Cong Ma : (This is a summarized form of the commit message in the attached patch. I'm submitting a patch instead of a PR over GitHub, because it seems that the ``autoreconf`` output files are part of the repository. In order for the changes to take effect in the repo, I ma