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 barry, pitrou, serhiy.storchaka, vstinner
Date 2020-03-09.08:43:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The GCC documentation contains a good example:

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;
      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 :-)
Date User Action Args
2020-03-09 08:43:02vstinnersetrecipients: + vstinner, barry, pitrou, serhiy.storchaka
2020-03-09 08:43:02vstinnersetmessageid: <>
2020-03-09 08:43:02vstinnerlinkissue38249 messages
2020-03-09 08:43:02vstinnercreate