util: Make unreachable at least be an assert
authorCarl Worth <cworth@cworth.org>
Fri, 5 Dec 2014 16:05:44 +0000 (08:05 -0800)
committerCarl Worth <cworth@cworth.org>
Fri, 16 Jan 2015 21:47:40 +0000 (13:47 -0800)
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 <ian.d.romanick@intel.com>
src/util/macros.h

index 5fc6729536cd6027dbd8aa84247c2f338b7f8084..eec8b9352cc4b14391521b8a87eb78a065de3c39 100644 (file)
@@ -82,7 +82,7 @@ do {                        \
 #endif
 
 #ifndef unreachable
-#define unreachable(str)
+#define unreachable(str) assert(!str)
 #endif
 
 /**