Macro expansion broken when arguments intersect parameters
"The C preprocessor chainsaw"
Brought to you by:
imkinghan
If a function-like macro is called with arguments some of which shadow formal parameters then the expansion can lose the shadowing argument and substitute another.
E.g. if FOO(T1,T2)
is called with (T2,T3)
then replacement of T1
with T2
at first yields FOO(T2,T2)
; then replacement of T2
with T3
yields FOO(T3,T3)
.
To fix this replaced segments must be noted and not replaced again.
Closed in v6.0