Sorry for bad English.
Suppose the code:
#define FOO(x,y) FOO ## x
#define BAR A, B
FOO(A, B)
successfully expanded to FOOA
. But when I write FOO(BAR)
, the C preprocessor (gcc -E
) give error
error: macro "FOO" requires 2 arguments, but only 1 given
How I should change FOO
macro if I want expand FOO(BAR)
to FOOA
?