C preprocessor Macro defining Macro
问题 Can you do something like this with a macro in C ? #define SUPERMACRO(X,Y) #define X Y then SUPERMACRO(A,B) expands to #define A B I have a feeling not because the preprocessor only does one pass. Official gcc only. No third-party tools please. 回答1: Macros can't expand into preprocessing directives. From C99 6.10.3.4/3 "Rescanning and further replacement": The resulting completely macro-replaced preprocessing token sequence is not processed as a preprocessing directive even if it resembles