return(struct) implementation

Anthony Scian afscian at violet.waterloo.edu
Wed Mar 22 10:56:47 AEST 1989


In article <1989Mar18.144546.10605 at ziebmef.uucp> mdfreed at ziebmef.UUCP (Mark Freedman) writes:
>>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 ?

WATCOM C7.0 is one MS-DOS ANSI C compiler that did it right (with the
best optimizer, also). By the way, you forgot to include Microsoft's
C compiler in your list of broken compilers (even their OS/2 version!).

-- Anthony Scian           \\ "Working with roots and twigs, Tom managed
afscian at violet.uwaterloo.ca \\ to build a working tractor beam. Then he
afscian at violet.waterloo.edu  \\ waited ..." - Aarrr Trek: The Wrath of Tom



More information about the Comp.lang.c mailing list