diff options
| author | Dan Halbert <halbert@halwitz.org> | 2019-12-12 15:51:13 -0500 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2019-12-12 15:51:13 -0500 |
| commit | ef2ef7a6b8c30dd64753e2ceca7587d9ead90e44 (patch) | |
| tree | ada3663598b60f30a1ba53b3a8ff5b8143af8e76 /py/mpconfig.h | |
| parent | e11fabd5e0979fa257a81d6025a0df0b6652b600 (diff) | |
| parent | bcd03ed7ee6cfbf0f3be926c2f7912201c5a7ca6 (diff) | |
merge from master
Diffstat (limited to 'py/mpconfig.h')
| -rwxr-xr-x | py/mpconfig.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index 3ec383817..a0d211bfa 100755 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1440,6 +1440,15 @@ typedef double mp_float_t; #define MP_UNLIKELY(x) __builtin_expect((x), 0) #endif +// To annotate that code is unreachable +#ifndef MP_UNREACHABLE +#if defined(__GNUC__) +#define MP_UNREACHABLE __builtin_unreachable(); +#else +#define MP_UNREACHABLE for (;;); +#endif +#endif + #ifndef MP_HTOBE16 #if MP_ENDIANNESS_LITTLE # define MP_HTOBE16(x) ((uint16_t)( (((x) & 0xff) << 8) | (((x) >> 8) & 0xff) )) |
