Xref: utzoo comp.lang.c:8843 comp.sys.ibm.pc:14054 Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!nrl-cmf!cmcl2!rutgers!iuvax!silver!bobmon From: bobmon@silver.bacs.indiana.edu (Skizofrenio the Elder...Younger) Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: cdecl keyword Message-ID: <1353@silver.bacs.indiana.edu> Date: 2 Apr 88 14:40:22 GMT Organization: Schizophrenics `R` Us Lines: 19 Keywords: cdecl MicroSoft C Summary: Making everything automatically compatible would be expensive! Barry Margolin proposes that all language-compilers (on a given architecture, perhaps) could internally handle function-calling in the same manner. But that means that no language would be as efficient as it could be. In parti- cular, Pascal can check some things at compile-time by forbidding options such as variable-length parameter lists. Who would want to write a Pascal compiler that has to silently add back in the functionality to decide how many arguments are being received? (Turbo C goes the other way, and allows "Pascal-type" declarations for functions with a fixed number of arguments. Then you have to be sure that your standard library calls are forced to "C-type" anyway. They don't recommend all this for beginners.) On another level, I assume (no, I don't know) that C has a standard for whether the caller or the callee saves working registers. How could you internally adjust for another language with a conflicting standard? Other than by a programmer-specified switch that says "violate the standard at this point"? disclaimer: If I knew what I was talking about, I probably wouldn't bother to say anything.