Yet Another Lint Foul-up

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Jan 7 20:20:32 AEST 1989


In article <14502 at oberon.USC.EDU> blarson at skat.usc.edu (Bob Larson) writes:
>In article <9296 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>Depending on which version of lint you use, (I've heard it is fixed
>in sunos 4.0) you should add:
>	varargs functions

Ok, that's another.

>At least one version of varargs does not allow any arguments to
>the function besides va_alist, and the /*VARARGS0*/ comment does
>not shut the lint I use (sunos 3.2) up.  /*VARARGSn*/ n!=0 is not
>portable.

Plain /*VARARGS*/ works, although it disables type checking of ALL
the arguments.  Note that the varargs specification does NOT permit
any formal parameter besides va_alist.  Even if the first argument
always has the same type, you're required to pick it up via the
va_arg macro like all the rest.



More information about the Comp.lang.c mailing list