Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!uunet!aussie!rex From: rex@aussie.UUCP (Rex Jaeschke) Newsgroups: comp.std.c Subject: Re: returning more than 4 bytes Message-ID: <22.UUL1.3#5077@aussie.UUCP> Date: 13 Jun 89 19:20:50 GMT References: <10395@smoke.BRL.MIL> Organization: Journal of C Language Translation Lines: 31 > In article <20.UUL1.3#5077@aussie.UUCP> rex@aussie.UUCP (Rex Jaeschke) writes: > >DEC's VAX C, for example, cannot pass in anything larger than 255 longwords > > Strictly speaking, a C implementation on such a machine COULD pass an > arbitrarily large amount of arguments, using a different design for > function linkage than DEC chose. You are quite correct Doug. As I recall when trying this on DEC's ULTRIX pcc several years ago, it allowed larger staructures to be passed. It passed them on the stack first and then called the function specifying one less argument than the programmer actually specified. The called function then picked that structure off the stack prior to the function call frame. I think the restriction was permitted by X3J11 at the request of DEC though but I think that's a bit of a red herring since VAX C "violates" the VAX Std Calling sequence in numerous other ways anyway. (Passing doubles by value, and strings as nul-terminated rather than as desciptors.) OK, DEC folks I know you have a special dispensation from the architecture group but I consider it a "violation." Rex ---------------------------------------------------------------------------- Rex Jaeschke | C Users Journal | Journal of C Language Translation (703) 860-0091 | DEC PROFESSIONAL |1810 Michael Faraday Drive, Suite 101 uunet!aussie!rex | Programmers Journal | Reston, Virginia 22090, USA ---------------------------------------------------------------------------- Convener of the Numerical C Extensions Group (NCEG) ----------------------------------------------------------------------------