Is there a way in gcc/g++ 4.* to write a macro that expands into several lines?
The following code:
#define A X \\ Y
Expands into>
You can just put a magic character sequence in the macro, e.g.
#define X(y,z) y nl z
run gcc -E infile | sed g/s/nl/\n/ > whatever
(Maybe not exactly right, but you get the idea, right? Pipe it through sed or tr or run Emacs on the output.)
I do this sometimes to use C macros to generate source code and no I don't want to learn how to do it in Perl or M4 or yet another tool.