summaryrefslogtreecommitdiff
path: root/lib/birdlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/birdlib.h')
-rw-r--r--lib/birdlib.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h
index caa26b94..23036c1b 100644
--- a/lib/birdlib.h
+++ b/lib/birdlib.h
@@ -165,14 +165,21 @@ void debug(const char *msg, ...); /* Printf to debug output */
#define ASSERT_DIE(x) do { if (!(x)) bug("Assertion '%s' failed at %s:%d", #x, __FILE__, __LINE__); } while(0)
+#define EXPENSIVE_CHECK(x) /* intentionally left blank */
+
#ifdef DEBUGGING
#define ASSERT(x) ASSERT_DIE(x)
#define ASSUME(x) ASSERT_DIE(x)
+#ifdef ENABLE_EXPENSIVE_CHECKS
+#undef EXPENSIVE_CHECK
+#define EXPENSIVE_CHECK(x) ASSERT_DIE(x)
+#endif
#else
#define ASSERT(x) do { if (!(x)) log(L_BUG "Assertion '%s' failed at %s:%d", #x, __FILE__, __LINE__); } while(0)
#define ASSUME(x) /* intentionally left blank */
#endif
+
#ifdef DEBUGGING
asm(
".pushsection \".debug_gdb_scripts\", \"MS\",@progbits,1\n"