Varargs, portability

Richard Harter g-rh at cca.UUCP
Sun May 25 14:06:50 AEST 1986


In article <> ark at alice.UucP (Andrew Koenig) writes:
>>>Is the following program portable to any machine which provides a
>>>(reasonable) implementation of C.
>>> ...
>>>	joe( 1,2.5,3,4.5,5,6.5,7,8.5,9,10.5,11,12.5,13,14.5,15, 16.5, 17, 
>>>18.5, 19,20.5,21,22.5,23,24.5,25,26.5,27,28.5,29,30.5,31,32.5,33,34.5,35,36.5,
>>>37,38.5,39,40.5,41,42.5,43,44.5,45,46.5,47,48.5,49,50.5,51,52.5) ;
>>
>>No, because you have exceeded the VAX's 255-byte argument limit.
>
>Putting it another way: some compilers may be broken.
>
>It is the compiler's job to shield users from silly restrictions
>in the hardware.  Of course, some compilers fall down on the job.


This is, of course, not a hardware restriction but instead is a
software implementation restriction.  More importantly, by this kind
of reasoning, almost every C compiler and almost every implementation
of Unix is "broken".  Any time you code system software with hard
table sizes you are creating "broken" software which fails in one
way or another when the table size limits (all too often hidden
from the user) are exceeded.

		Richard Harter, SMDS Inc.



More information about the Comp.lang.c mailing list