returning more than 4 bytes

Rex Jaeschke rex at aussie.UUCP
Wed Jun 14 05:20:50 AEST 1989


> In article <20.UUL1.3#5077 at aussie.UUCP> rex at 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)
----------------------------------------------------------------------------



More information about the Comp.std.c mailing list