Compiler Recommendations
Kevin D. Clark
kevin_d_clark at comcast.net
Mon Jan 7 10:15:55 EST 2008
Jerry Feldman <gaf at blu.org> writes:
> Additionally, some languages pass their
> arguments in different orders. C passes its arguments onto the stack
I don't believe that the C standard specifies that an implementation
must use a stack to somehow transport arguments, but if you can find
the place in the standard where it specifies a stack must be used, I
would learn something new.
> last to first such that the called function picks up the first argument
> from the top of the stack(below the return address of course). The
> reason for this is that C and C++ allow for a variable number of
> arguments. (Note that passing via registers simulates a stack). Most
> other languages pass arguments first to last.
I don't believe that the C standard specifies that an implementation
must pass arguments "last to first", but if you can find the place in
the standard where it specifies this order, I would learn something
new.
I am certainly familiar with particular implementations and ABIs that
specify these things, Perhaps this is what you are alluding to?
(there now, I have made my point)
Kind regards,
--kevin
--
GnuPG ID: B280F24E God, I loved that Pontiac.
alumni.unh.edu!kdc -- Tom Waits
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Discuss
mailing list