Message352965
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() |
|
Date |
User |
Action |
Args |
2019-09-22 09:47:06 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, barry, vstinner |
2019-09-22 09:47:06 | serhiy.storchaka | set | messageid: <1569145626.92.0.408422678201.issue38249@roundup.psfhosted.org> |
2019-09-22 09:47:06 | serhiy.storchaka | link | issue38249 messages |
2019-09-22 09:47:06 | serhiy.storchaka | create | |
|