TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
TIOBE - C Coding Standard

Guideline:  12.3.2#1Checked automatically with code checker

Synopsis:The result of the "##" operator shall be a legal pre-processing token.
Severity Level:3


The "##" operator should be used sparingly and with care. In particular there are constraints which operate on the context in which it may be used. The result of the glue operator should be a valid pre-processing token; so it is not legal, for instance, to glue together an operator to an identifier. Valid pre-processing tokens must have the lexical form of a header-name, an identifier, a character constant, a string literal, an operator, a punctuator or any non-white-space character that cannot be one of the above. Example:

#define Select(a)   (xxx_struct.##a) /* WRONG: The "." is a separate token */
#define Select(a)   (xxx_struct.a) /* RIGHT */