I do not think this is bad. The stringtize operator is very useful for writing macros, such as statements:
#define assert(x) do { if (!(x)) { printf("assert failed: %s\n",
You are abusing any useful feature. I once had a bright idea to “simplify” Qt Atoms by writing:
#define ATOM(x) (((#x)[0] << 24) | ((#x)[1] << 16) | ...
So you can say ATOM(MPEG) and get ('M' << 24 | 'P' << 16 | ...) . In fact, it worked well enough that gcc could generate whole constants from it ... Sometimes ... Now it was evil!
source share