summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-01-24 19:58:28 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-01-24 19:58:28 +0100
commit21ce1398513a085d44ef89a9250541769ad11e46 (patch)
tree00af7247c65303dd1585597a65881d0fd5bad442
parent4624d6d20ee7171b50be994b7d2881d93bc901d4 (diff)
compat/macros: define unreachable()
-rw-r--r--compat/macros1.h6
1 files changed, 6 insertions, 0 deletions
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