STINNER Victor <vstin...@python.org> added the comment:
The GCC documentation contains a good example: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html """ Another use for __builtin_unreachable is following a call a function that never returns but that is not declared __attribute__((noreturn)), as in this example: void function_that_never_returns (void); int g (int c) { if (c) { return 1; } else { function_that_never_returns (); __builtin_unreachable (); } } """ This example is more explicit than a function which gets an "unexpected" value: such case should use Py_FatalError() if I understand correctly. By the way, Py_FatalError() should be avoided: it's always better to report the failure to the caller :-) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38249> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com