P
Peter Nilsson
Many current C implementations are descended from older
implementations, and maintain the same calling conventions,
partly to cater to old code and partly just out of inertia.
The requirement that variadic functions may not be called
without a visible prototype caters to implementations that
allow either the caller or the callee to clean things up,
but implementations don't necessarily take advantage of
that.
I don't think I've ever seen an implementation where the
callee/caller responsible for cleaning up a stack is
different for fixed verses variadic functions. That's
not to say there aren't any!
But note that promotion is _not_ to be applied to arguments
to named parameters of narrow type. Also, there are risc
systems where 'variable' arguments are passed on the stack,
instead of via the default, registers.