aboutsummaryrefslogtreecommitdiffstats
path: root/src/gcc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gcc.h')
-rw-r--r--src/gcc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gcc.h b/src/gcc.h
index 2282ff5e6..1bd770597 100644
--- a/src/gcc.h
+++ b/src/gcc.h
@@ -79,6 +79,12 @@
#endif
+#if defined(__GNUC__) || defined(__clang__)
+#define gcc_unreachable() __builtin_unreachable()
+#else
+#define gcc_unreachable()
+#endif
+
#ifdef __cplusplus
#ifdef __GNUC__