cdecl keyword
Dr. T. Andrews
tanner at ki4pv.uucp
Sat Apr 9 01:05:44 AEST 1988
In article <185 at premise.ZONE1.COM>, chang at premise.ZONE1.COM (John Chang) writes:
) The calling convention we're talking about here isn't call-by-name or
) call-by-value. It's simply the order in which parameters are passed
) on the stack. And in C, that order *must* be right to left in order
) to support variable length functions like printf.
Not true. I remember many dark moons ago (real-world example, theory
experts please ignore) a compiler, on a z-80 yet, which pushed its
args left-to-right. It handled [a pre-determined list of] variadic
functions as special cases, pushing (invisibly to the user) an extra
word containing the argument count.
--
{allegra clyde!codas decvax!ucf-cs ihnp4!codas killer}!ki4pv!tanner
More information about the Comp.lang.c
mailing list