cdecl keyword

Chip Salzenberg chip at ateng.UUCP
Tue Apr 5 03:13:46 AEST 1988


In article <185 at premise.ZONE1.COM> chang at premise.ZONE1.COM (John Chang) writes:
>However, the right to left parameter passing takes more code space
>(one extra instruction to fix the stack after a function call) and
>hence takes longer to execute than 'pascal' calling convention 
>(left-to-right parameter passing).

The Pascal calling sequence is faster than C, but for a different reason.
The Pascal calling sequence is not faster because of its backwards (:-])
order, but because it does not allow variadic functions.  Since the called
function is always called with the same number of arguments, it can clean
up the stack when it returns instead of making the caller do it.
--
Chip Salzenberg                 "chip at ateng.UU.NET" or "codas!ateng!chip"
A T Engineering                 My employer's opinions are a trade secret.
       "Anything that works is better than anything that doesn't."



More information about the Comp.lang.c mailing list