STINNER Victor added the comment:

+#define Py_UNREACHABLE() abort()

Using such macro, I don't think that __builtin_unreachable() is useful.

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: 

      (...)
      function_that_never_returns ();
      __builtin_unreachable ();

I expect abort() to be annotated with __attribute__((noreturn)) on the C 
library used GCC.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31338>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to