English is not my native language; thus I show the code to depict.
#define concat_temp(x, y) x##y
#define concat(x, y) concat_temp(x, y)
#define BAR 2
int main() {
concat_temp(FOO, BAR)
concat(FOO, BAR)
}
When I executed clang -E, the macros were expanded to
int main() {
FOOBAR
FOO2
}
Who can explain to me why concat_temp couldn't expand the bar to 2 but concat did the trick?