I just dug up an error in some code we are working with *, which did not work due to the following situation:
Assert(SomeVitalFunction(foo) == OK)
This worked perfectly all the time when the DEBUG macros were #defined:
#ifdef DEBUG #define Assert(x) if((x) == 0){} #else #define Assert(x) #endif
But when we #undef'd DEBUG , this #undef'd DEBUG call to the vital function from the code.
I can't figure out for my whole life how this can work with DEBUG #undef 'd, and it seems like a bad idea, as a rule, to place a call to some function inside such a statement.
Did I miss something?
* = Edit to clarify the following Carpetsmoker comment: The code comes from an especially backward bondage of Elbonian code slaves, our task was to crack, cut, shave, polish, sanitize and put lipstick on the item.
source share