In a #define one can use A ## B to concatenate preprocessor variables and defines to an identifier.
#define ADD_UNDERSCORE(X) X##_
/* ADD_UNDERSCORE(n) -> n_ */
Is there an equivalent leftside of the #define? E.g.
#define A a
#define B b
#define A##B(X) X
/* ab(n) -> n */
No. In a macro definition, the first token after the
definehas to be an identifier ((draft) ISO/IEC 9899;1999, 6.10, page 149).There is no other preprocessing of the
#definedirectives which could make an identifier out of something else. In particular, the standard specifies (6.10.3):And it isn’t stated “otherwise” for the macro name.