Congratulations! You have just discovered why it is a bad idea to use macros for this sort of thing. As a general rule, only make something a macro if it cannot be done using a function. In this case, SQ
could easily be implemented as a function instead:
int sq (int x)
{
return x * x;
}