Issue with printing a string

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top