This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients congma, vstinner
Date 2021-03-24.14:37:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1616596648.29.0.190409442513.issue43615@roundup.psfhosted.org>
In-reply-to
Content
> 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 eebaa9bfc593d5a46b293c1abd929fbfbfd28199

Fix for old GCC (bpo-41875):

* master: commit 24ba3b0df5e5f2f237d7b23b4017ba12f16320ae
* 3.9.1: commit cca896e13b230a934fdb709b7f10c5451ffc25ba

I prefer to not backport this feature, since, as you wrote, it's tricky to make sure that it's available on the C compiler.

I close the issue since Py_UNREACHABLE() works as expected on Python 3.9 and newer.
History
Date User Action Args
2021-03-24 14:37:28vstinnersetrecipients: + vstinner, congma
2021-03-24 14:37:28vstinnersetmessageid: <1616596648.29.0.190409442513.issue43615@roundup.psfhosted.org>
2021-03-24 14:37:28vstinnerlinkissue43615 messages
2021-03-24 14:37:27vstinnercreate