Trying to create a macro which can be used for print debug messages when DEBUG is defined, like the following pseudo code:
#define DEBUG 1 #define debug_prin
This is what I use:
#if DBG #include #define DBGPRINT printf #else #define DBGPRINT(...) /**/ #endif
It has the nice benefit to handle printf properly, even without additional arguments. In case DBG ==0, even the dumbest compiler gets nothing to chew upon, so no code is generated.