The behaviour of the C preprocessor is defined by the ISO C standard, not by GCC. It is not likely that GCC would add non-standard extensions to add such features to the preprocessor. You could look at http://www.boost.org/doc/libs/1_60_0/libs/preprocessor/doc/ to see what can be done using the standardpreprocessor, or you could look into other ways to generate the code before you compile it.