commit b6237da857b79577287cf4eaa08d1bbd156fe936
parent 5dc9179db6c0d84a2598e91063d5aee33f630e3b
Author: Robert Russell <robertrussell.72001@gmail.com>
Date: Thu, 27 Apr 2023 11:46:56 -0700
Add unreachable macro
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/inc/debug.h b/inc/debug.h
@@ -18,7 +18,8 @@
#define assert require
#endif
+#define unreachable require(0, "unreachable code reached")
+
/* Print the given formatted message to stderr followed by a newline,
* and then abort. */
noreturn void throw(char *fmt, ...);
-