Simply unbelievable.
Code:
#define DEBUG
#ifdef DEBUG
#define dg(x) _tprintf(x)
#else
#define dg(x) do {} while (0)
#endif
dg ( (_T("parsed node %s %d"), wordwrk, z) );
The above fails because the LAST _tprintf parameter is an INT. Swap the two and the syntax is then OK:
dg ( (_T("parsed node %d %s"), z, wordwrk) );
I'm all ears as to why this simply isn't a replacement of dg with _tprintf.
Fortunately, I found another better use of macros for debugging:
Code:
#define NODEBUG2
#ifdef DEBUG2
#define D if(1)
#else
#define D if(0)
#endif
D _tprintf(_T(parsed node %s %d"), wordwrk, z);