cdecl keyword

Roberto Shironoshita shirono at grasp.cis.upenn.edu
Fri Apr 1 13:41:01 AEST 1988


In article <2521 at bsu-cs.UUCP> dhesi at bsu-cs.UUCP (Rahul Dhesi) writes:
>[ cc -pascal mystuff.c ]
>If mystuff.c uses any C library function, you still want that library
>function to be called using the C calling convention, even though you
>asked the compiler to generate code for the Pascal calling convention.

I would much rather do away with the switch to generate foreign
calling conventions, and assume anything is a C function unless
otherwise declared.

>With a little foresight Microsoft could have just used the same calling
>convention in all its language translators.

I am of the belief that most languages have their own calling
conventions: FORTRAN uses pass-by-reference for everything (at least,
that's what I heard last); PASCAL uses pass-by-value for regular
parameters, and pass-by-reference for VAR parameters.  C uses
pass-by-value for everything.
                                  Roberto Shironoshita
-------------------------------------------------------------------------
1- The University doesn't know I exist.   | Internet:
2- Of course I may be wrong.              |   shirono at grasp.cis.upenn.edu



More information about the Comp.lang.c mailing list