Robert Gamble said:
I *think* this is Standard, someone will correct me if its not:
#define QUOTE(x) '
No, it's not, on the basis of that line alone. The replacement
list in a macro definition must be a sequence of preprocessing
tokens. A lone single-quote is not a valid preprocessing token.
In fact C99 section 6.4 explicitly disallows the possibility:
preprocessing-token:
header-name
identifier
pp-number
character-constant
string-literal
punctuator
each non-white-space character that cannot be one of the above
....
The categories of preprocessing tokens are: header names,
identifiers, preprocessing numbers, character constants,
string literals, punctuators, and single non-white-space
characters that do not lexically match the other
preprocessing token categories.58) If a ' or a " character
matches the last category, the behavior is undefined.