cpp: Directives Within Macro Arguments

1 
1 3.9 Directives Within Macro Arguments
1 =====================================
1 
1 Occasionally it is convenient to use preprocessor directives within the
1 arguments of a macro.  The C and C++ standards declare that behavior in
1 these cases is undefined.  GNU CPP processes arbitrary directives within
1 macro arguments in exactly the same way as it would have processed the
1 directive were the function-like macro invocation not present.
1 
1    If, within a macro invocation, that macro is redefined, then the new
1 definition takes effect in time for argument pre-expansion, but the
1 original definition is still used for argument replacement.  Here is a
1 pathological example:
1 
1      #define f(x) x x
1      f (1
1      #undef f
1      #define f 2
1      f)
1 
1 which expands to
1 
1      1 2 1 2
1 
1 with the semantics described above.
1