diff options
Diffstat (limited to 'osdep/compiler.h')
-rw-r--r-- | osdep/compiler.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/osdep/compiler.h b/osdep/compiler.h index 7c9f859f3a..471fc2ffd1 100644 --- a/osdep/compiler.h +++ b/osdep/compiler.h @@ -23,4 +23,10 @@ #define alignof(x) (offsetof(struct {char unalign_; x u;}, u)) #endif +#ifdef __GNUC__ +#define MP_UNREACHABLE() (assert(!"unreachable"), __builtin_unreachable()) +#else +#define MP_UNREACHABLE() (assert(!"unreachable"), abort()) +#endif + #endif |