varargs strangeness?
Doug Gwyn
gwyn at smoke.BRL.MIL
Sat Dec 17 07:11:09 AEST 1988
In article <353 at bdrc.UUCP> jcl at bdrc.UUCP (John C. Lusth) writes:
>What's going wrong, how do I fix it, and why does the macro add
>that extra star to the cast?
You basically answered your own question -- the * is added in
order to get a pointer to the right type and of the right width,
and that is what breaks in your case, because not all types can
correctly have * appended to produce pointers to those types.
The obvious solution is to use a typedef for (void (*)()) and
use that in the invocation of va_arg().
More information about the Comp.lang.c
mailing list