I haven't seen this solution to the problem but am surprised it is not in common use
. It seems to work in Xcode Objc. Distinguish between "defined with no value" and "defined set 0"
#define TRACE
#if defined(TRACE) && (7-TRACE-7 == 14)
#error TRACE is defined with no value
#endif