Undeclared function arguments
K.LAUX
rkl1 at hound.UUCP
Mon Oct 17 03:30:42 AEST 1988
YYBACK (i, m)
int i;
{
...
}
The reason that 'm' was not declared was that the body of the
function did not reference the variable at all *AND* it was the last
parameter in the formal argument list. Since arguments are pushed on
the stack from *right* to *left*, there was no need to know its size.
It would be a different case if:
YYBACK (i, m, n)
and only i and n were referenced because now the compiler would
*have* to know the size of m in order to correctly reference n on the stack.
--rkl
More information about the Comp.lang.c
mailing list