From e2aca77132d42aefa2d7a2346a4a3fd910c8e2a9 Mon Sep 17 00:00:00 2001 From: Marty Connor Date: Thu, 14 Sep 2006 17:38:17 +0000 Subject: [PATCH] update DBG_DISCARD macro to allow the compiler to see the argument for compile-time checking, while still having it optimized away during compilation --- src/include/compiler.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/include/compiler.h b/src/include/compiler.h index f2e63f1d..3aee4a60 100644 --- a/src/include/compiler.h +++ b/src/include/compiler.h @@ -124,7 +124,9 @@ __asm__ ( ".equ\tDEBUG_LEVEL, " DEBUG_SYMBOL_STR ); #endif #define DBG_PRINT(...) printf ( __VA_ARGS__ ) -#define DBG_DISCARD(...) do {} while ( 0 ) +#define DBG_DISCARD(...) do { if ( 0 ) printf ( __VA_ARGS__ ); } while ( 0 ) +/*#define DBG_DISCARD(...) do {} while ( 0 )*/ + #define DBG DBG_DISCARD #define DBG2 DBG_DISCARD