returning more than 4 bytes

Rex Jaeschke rex at aussie.UUCP
Tue Jun 13 10:53:43 AEST 1989


I know that many compilers permit functions that return full structures
but is it in the latest ansii standard draft, or will it be left as a
compiler extension?

I recall the draft places no limits on the size of a structure or 
union that may be returned by value. Initially, that was true for 
passing by value also but was amended such that the max size that can be 
passed IN is implementation-defined. DEC's VAX C, for example, cannot 
pass in anything larger than 255 longwords (1020 bytes) since that's 
the limit on the size of a stack frame in the VAX Standard Calling 
sequence. However, that compiler places no limit on the returned 
object size.

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