e float are
> promoted to type double. So, if the caller passes a char as an optional
> argument, it is promoted to an int, and the function can access it with
> va_arg (ap, int).
This seems to be the solution -- thanks a lot for making this clear!
Best regards,
Holger
-
uot;. This was a wrong assumption, as Lukas Geyer made clear in
his mail (also on this mail thread), and I in fact have to read
it with va_arg(ap, int). Maybe it's a good idea to generally
define (with typedef) "boolean" as "int" -- nowadays there is
not speedup with us
Hi Michael,
> > > > - gi->checked = va_arg(ap, boolean);
> > > > + gi->checked = (boolean) va_arg(ap, int);
[...]
> Nope, this patch makes va_arg get the proper arguments in the first place.
> va_arg may only be called with the data type argument being one of the
> data types after def
3 matches
Mail list logo