summaryrefslogtreecommitdiffstats
path: root/src/util/macros.h
diff options
context:
space:
mode:
authorCarl Worth <[email protected]>2014-12-05 08:05:44 -0800
committerCarl Worth <[email protected]>2015-01-16 13:47:40 -0800
commit62d5b4b03aa63582cf0801d306d7ca055cca40a0 (patch)
tree1d4d6b89e94fa52a672f42c5801c78e5d8ff4d06 /src/util/macros.h
parentf87ffd5cc32dbfaff0a110fd7a94a92866c95f3b (diff)
util: Make unreachable at least be an assert
Previously, if __builtin_unreachable() was unavailable, the unreachable macro was defined to do nothing. We do better here, by at least still making it an assert. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/util/macros.h')
-rw-r--r--src/util/macros.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/macros.h b/src/util/macros.h
index 5fc6729536c..eec8b9352cc 100644
--- a/src/util/macros.h
+++ b/src/util/macros.h
@@ -82,7 +82,7 @@ do { \
#endif
#ifndef unreachable
-#define unreachable(str)
+#define unreachable(str) assert(!str)
#endif
/**