aboutsummaryrefslogtreecommitdiff
path: root/include/platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/platform.h')
-rw-r--r--include/platform.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h
index 8210e5c49..ea49c7e92 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -45,6 +45,13 @@
#define UNUSED_PARAM __attribute__ ((__unused__))
#define NORETURN __attribute__ ((__noreturn__))
+
+#if __GNUC_PREREQ(4,5)
+# define bb_unreachable(altcode) __builtin_unreachable()
+#else
+# define bb_unreachable(altcode) altcode
+#endif
+
/* "The malloc attribute is used to tell the compiler that a function
* may be treated as if any non-NULL pointer it returns cannot alias
* any other pointer valid when the function returns. This will often