[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Build-Conficts: gcc-3.3, and varargs



On Sat, Jul 31, 2004 at 08:39:52PM -0400, Justin Pryzby wrote:
> If I read the code, it seems like there's something funky with the first
> variable argument.  What I have for now is:
> 
> 	-Tcl_AppendResult(Tcl_Interp *interp, char *p, va_alist)
> 	+void Tcl_AppendResult(Tcl_Interp *interp, ...)
> 
> Can this be right (neglecting the char *p parameter)?  It seems like
> they're reading in the first argument (the constant, interp) using
> va_arg.  That's why I left out p; it never gets used!

It's usually better to leave char *p in the prototype and adjust the
code that's using it to use that argument as a normal function argument,
then read the remaining arguments using va_arg().

Cheers,

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: