3 ms·
I love using macros for debugging like this. It lessens the mental hurdle, and it's easy to redefine the macro as ((void)0) in production code. Two adjustments
by torstenvl 5y ago
I love using macros for debugging like this. It lessens the mental hurdle, and it's easy to redefine the macro as ((void)0) in production code.
Two adjustments I'd make in the linked code: (1) _Generic became part of the standard over a decade ago, so this can safely be just one macro (lessening the mental hurdle even more); and (2) I don't think do{...}while(0) is necessary here for a single fprintf() call.