Browse Source

update DBG_DISCARD macro to allow the compiler to see the argument for compile-time checking, while still having it optimized away during compilation

tags/v0.9.3
Marty Connor 18 years ago
parent
commit
e2aca77132
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/include/compiler.h

+ 3
- 1
src/include/compiler.h View File

124
 #endif
124
 #endif
125
 
125
 
126
 #define DBG_PRINT(...) printf ( __VA_ARGS__ )
126
 #define DBG_PRINT(...) printf ( __VA_ARGS__ )
127
-#define DBG_DISCARD(...) do {} while ( 0 )
127
+#define DBG_DISCARD(...) do { if ( 0 ) printf ( __VA_ARGS__ ); } while ( 0 )
128
+/*#define DBG_DISCARD(...) do {} while ( 0 )*/
129
+
128
 #define DBG  DBG_DISCARD
130
 #define DBG  DBG_DISCARD
129
 #define DBG2 DBG_DISCARD
131
 #define DBG2 DBG_DISCARD
130
 
132
 

Loading…
Cancel
Save