I don't understand how to debug the following code "on paper" (without a compiler):
#include <stdio.h>
#define SUB(T,x,y) {T x=y++; {T x=y++;}}
int x;
static int y;
void f(int n)
{ if (n) { SUB(int,x,y) f(n-1); } }
main()
{
extern int x,y;
int i=0;
for ( ; ++i<3; )
{
f(i); printf("%d ",y);
}
return (0);
}
How to evaluate values of a macro SUB?