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 serhiy.storchaka
Recipients barry, serhiy.storchaka, vstinner
Date 2019-09-22.09:47:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569145626.92.0.408422678201.issue38249@roundup.psfhosted.org>
In-reply-to
Content
Py_UNREACHABLE is used to indicate that a specific point in the program cannot be reached, even if the compiler might otherwise think it can. This is exact the case for __builtin_unreachable in GCC and Clang. I propose to extend Py_UNREACHABLE() to __builtin_unreachable() in the release mode. This will allow the compiler to generate more efficient code.

If there are circumstances in which Py_UNREACHABLE() is reachable, then it is improper use of Py_UNREACHABLE(). It should be replaced with raising an appropriate exception (like TypeError, ValueError, RuntimeError or SystemError) or, in extreme cases, with explicit Py_FatalError()
History
Date User Action Args
2019-09-22 09:47:06serhiy.storchakasetrecipients: + serhiy.storchaka, barry, vstinner
2019-09-22 09:47:06serhiy.storchakasetmessageid: <1569145626.92.0.408422678201.issue38249@roundup.psfhosted.org>
2019-09-22 09:47:06serhiy.storchakalinkissue38249 messages
2019-09-22 09:47:06serhiy.storchakacreate