You are not crazy, but you are approaching this from the wrong angle. You cannot have macros to have more preprocessor arguments, but you can conditionally define a macro based on the preprocessor arguments:
#ifdef DEBUG
# define DEBUG_PRINT printf
#else
# define DEBUG_PRINT log
#endif
If you have variable macros, you can do it #define DEBUG_PRINTF(...) func(__VA_ARGS__). Anyway. The second allows you to use function pointers, but I can’t imagine why you need it.
source
share