Re: "standard" C calling convention?

Christian Bau <christian.bau@cbau.freeserve.co.uk>
21 Feb 2003 00:40:30 -0500

          From comp.compilers

Related articles
"standard" C calling convention? peter@javamonkey.com (Peter Seibel) (2003-02-12)
Re: "standard" C calling convention? nmm1@cus.cam.ac.uk (2003-02-13)
Re: "standard" C calling convention? jgd@cix.co.uk (2003-02-13)
Re: "standard" C calling convention? gah@ugcs.caltech.edu (Glen Herrmannsfeldt) (2003-02-13)
Re: "standard" C calling convention? lars@bearnip.com (2003-02-13)
Re: "standard" C calling convention? dmr@bell-labs.com (Dennis Ritchie) (2003-02-21)
Re: "standard" C calling convention? christian.bau@cbau.freeserve.co.uk (Christian Bau) (2003-02-21)
Re: "standard" C calling convention? mgl8@attbi.com (Mike Ludwig) (2003-02-21)
Re: "standard" C calling convention? sander@haldjas.folklore.ee (Sander Vesik) (2003-02-21)
Re: "standard" C calling convention? andrew.higham@blueyonder.co.uk (Andrew) (2003-02-21)
Re: "standard" C calling convention? nmm1@cus.cam.ac.uk (2003-02-24)
Re: "standard" C calling convention? nmm1@cus.cam.ac.uk (2003-02-24)
Re: "standard" C calling convention? gah@ugcs.caltech.edu (Glen Herrmannsfeldt) (2003-02-24)
[4 later articles]
| List of all articles for this month |

From: Christian Bau <christian.bau@cbau.freeserve.co.uk>
Newsgroups: comp.compilers
Date: 21 Feb 2003 00:40:30 -0500
Organization: Compilers Central
References: 03-02-072 03-02-086
Keywords: C
Posted-Date: 21 Feb 2003 00:40:30 EST

> Well, many OS have somewhat of a standard, and C programs on that OS
> may or may not use it. C requires the ability to call with a variable
> number of arguments, which restricts somewhat the allowable calling
> conventions. (x86 has hardware support for a calling convention in
> which the called routine removes arguments from the stack. This is
> sometimes called the Pascal convention, and doesn't work well for C.)


C requires that ability only for calls to functions that are declared to
have a variable number of arguments. On a PowerPC, calling f (3) will
generate very different code if f is declared to take one argument or
declared to take a variable number of arguments.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.