"standard" C calling convention?

Peter Seibel <peter@javamonkey.com>
12 Feb 2003 13:42:26 -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)
[10 later articles]
| List of all articles for this month |

From: Peter Seibel <peter@javamonkey.com>
Newsgroups: comp.compilers
Date: 12 Feb 2003 13:42:26 -0500
Organization: Prodigy Internet http://www.prodigy.com
Keywords: C, question
Posted-Date: 12 Feb 2003 13:42:26 EST

People often refer to the "standard C calling convention", usually as
opposed to some other calling convention that a compiler also
supports. I have several questions, in no particular order about this

  - Am I correct in assuming that this is more of an de facto than de
      jure standard.

  - Is this calling convention the same across different machine
      architectures, OSes?

  - Where can I find a reliable description of it? (Other than looking
      at the source of gcc or something.)

  - Is the point of having a standard calling convention that it allows
      code compiled with different compilers to be linked together? (I
      suspect that question itself may expose my deep ignorance of the
      relation between compilers and linkers--please bear with me, I'm
      filling in the gaps as fast as I can.)

Peter Seibel
[Most ABIs have a standard calling convention. The Unix ones all do.
It has to be machine-specific, since it involves machine registers,
and stack layout. The point of a standard, any standard, is so that
products from different vendors can interoperate. -John]

Post a followup to this message

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