Question 15.11

I can't get va_arg to pull in an argument of type pointer-to-function.


The type-rewriting games which the va_arg macro typically plays are stymied by overly-complicated types such as pointer-to-function. If you use a typedef for the function pointer type, however, all will be well. See also question 1.21.

References: ANSI Sec. 4.8.1.2
ISO Sec. 7.8.1.2
Rationale Sec. 4.8.1.2


Read sequentially: prev next up top


This page by Steve Summit // Copyright 1995 // mail feedback