C Language preprocessing doubt
- by khanna_param
Hi,
There are different kind of macros in C language, nested macro is one of them.
Considering a program with the following macro
define HYPE(x,y) (SQUR(x)+SQUR(y))
define SQUR(x) (x*x)
using this we can successfully complile to get the result.
My question:- As we all know the C preprocessor replaces all the occurrence of the identifiers with the replacement-string. Considering the above example i would like to know how many times the C compiler traverses the program to replace the macro with the replacement values. I assume it cannot be done in one go.
Thanks.