next up previous contents index
Next: The va_end macro Up: Variable argument list Previous: The va_start macro

The va_arg macro

Changing an arbitrary type name into a type name which is a pointer to that type could require sophisticated rewriting. To allow the implementation of va_arg as a macro, va_arg need only correctly handle those type names that can be transformed into the appropriate pointer type by appending a *, which handles most simple cases. (Typedefs can be defined to reduce more complicated types to a tractable form.) When using these macros it is important to remember that the type of an argument in a variable argument list will never be an integer type smaller than int, nor will it ever be float. (See §gif.)

va_arg can only be used to access the value of an argument, not to obtain its address.

4 8 1 3


Pete Jinks
Fri Jan 19 12:31:56 GMT 1996