From 21ce1398513a085d44ef89a9250541769ad11e46 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 24 Jan 2019 19:58:28 +0100 Subject: compat/macros: define unreachable() --- compat/macros1.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compat') diff --git a/compat/macros1.h b/compat/macros1.h index 4c2d1c1e..148e1a77 100644 --- a/compat/macros1.h +++ b/compat/macros1.h @@ -48,3 +48,9 @@ //# define FULL_BARRIER() __sync_synchronize() # define COMPILER_BARRIER() asm volatile("" ::: "memory") #endif + +#ifdef _MSC_VER +# define unreachable() __assume(0) +#else +# define unreachable() __builtin_unreachable() +#endif -- cgit v1.2.3