How does the C
Preprocessor handle multiple macros? I searched it over here and Google too but not able to understand the exact rule that should be followed. The following code:
#define ABC xYz
#define xYz ABC
int main()
{
int ABC;
int xYz;
}
on gcc, generates preprocessor.i like this:
# 1 "preprocessor.c"
# 1 "<command-line>"
# 1 "preprocessor.c"
int main()
{
int ABC;
int xYz;
}
seems nothing is replaced here. And other code:
#define ABC kkk
#define xYz ABC
int main()
{
int ABC;
int xYz;
}
generates output like this:
# 1 "preprocessor.c"
# 1 "<command-line>"
# 1 "preprocessor.c"
int main()
{
int kkk;
int kkk;
}
So how all these are happening.