return(struct) implementation

Mark Freedman mdfreed at ziebmef.uucp
Sun Mar 19 05:45:45 AEST 1989


In article <11977 at haddock.ima.isc.com> karl at haddock.ima.isc.com (Karl Heuer) writes:
>In article <4425 at pt.cs.cmu.edu> marcoz at MARCOZ.BOLTZ.CS.CMU.EDU (Marco Zagha) writes:
>>Can anybody explain how returning a structure from a function is
>>typically implemented.  Assume it is too big to use registers.
>
>Some broken implementations use a static area in the callee and just return
>its address.  This mechanism is not reentrant, is forbidden by the pANS, and
>will be considered no further in this article.
>
   That implies that  1) the MS-DOS implementations with which I'm familiar
(Turbo-C 2.0, Datalight C 3.05, Lattice C 3.10), and probably several with
which I'm not, are broken   2) the marketeers for these companies have 
gotten a bit carried away when claiming dpANS compliance.
   Is anyone aware of MS-DOS compilers which implement structure returns 
according to dpANS ? Is anyone aware of software companies which intend to
correct the broken implementation ?



More information about the Comp.lang.c mailing list