varargs.h

geoff at ISM780.UUCP geoff at ISM780.UUCP
Thu Feb 28 15:51:53 AEST 1985


>>>char, short, and float are never meaningful because they
>>>are automatically widened to int, int, and double respectively.

>>Since sizeof is a compile-time constant, there is no reason why
>>va_arg cannot widen appropriately via ?: .  ...

>Yes, varargs could be changed to recognize the lengths of the narrow
>types -- on some machines.  However, consider a machine where int
>and float have the same size.

Well? So? and then?  Wouldn't the compiler know that, and act accordingly?
So the code is *marginally* slower, is this too big a price to pay for
correctness?  Or am I missing something?

>Anyway, even if you did manage to change varargs, all that would do
>is encourage people to write "portable" programs that would only
>run on the new version.  Best leave it as it is.
 ?????????????????????????^^???????????????????????????????????????(?)
Seems to me that a bug is a bug, are you saying it shouldn't be fixed because
it's already out?  A documented bug is *NOT* a feature!  Heaven forfend
someone should encourage people to write portable code!

	      Geoffrey Kimbrough -- INTERACTIVE Systems Corp.

      [ Whenever I see Oysters on a menu, I am reminded of a quote...]



More information about the Comp.lang.c mailing list