summaryrefslogtreecommitdiffstats
path: root/src/sord_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sord_internal.h')
-rw-r--r--src/sord_internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sord_internal.h b/src/sord_internal.h
index 5a7236d..71c2f6d 100644
--- a/src/sord_internal.h
+++ b/src/sord_internal.h
@@ -22,6 +22,12 @@
#include "sord/sord.h"
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+# define SORD_UNREACHABLE() __builtin_unreachable()
+#else
+# define SORD_UNREACHABLE() assert(false)
+#endif
+
/** Resource node metadata */
typedef struct {
size_t refs_as_obj; ///< References as a quad object