I have a test program like below.
#define TEST(A,B) A
#define TEST2(A,B) (A,B)
#define TEST3(A,B) TEST TEST2(A,B)
int main()
{
TEST3(Hello,World) //This will expand to TEST (Hello,World)
TEST (hello, World) // This will expand to hello
}
The TEST3 will expand to "TEST (Hello,World)", but it won't be expanded further using TEST definition. I initially thought it must be due to a space between TEST and TEST2(hello, world) in the TEST3 definition. But the plain invocation of TEST (hello, world) expands properly. Can someone explain what is happening here?