English
Language : 

CC78K4 Datasheet, PDF (177/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 10 LIBRARY FUNCTIONS
va_start,
va_starttop,
va_arg,
va_end
Special Functions
EXPLANATION
va_start
• In the va_start macro, the argument ap (argument pointer) must be a va_list type (char* type) object.
• A pointer to the next argument of parmN is stored in ap.
• parmN is the name of the last (rightmost) parameter specified in the function's prototype.
• If parmN has the register storage class, proper operation of this function is not guaranteed.
• If parmN is the first argument, proper operation of this function is not guaranteed.
va_starttop
• When the -ZO option (old function interface supporting option) is not specified, the va_start function cannot
be specified for the first argument because the first argument is passed via the register.
Use the macro in the following manner when the -ZO option is not specified.
• Use the va_starttop macro when specifying the first argument.
• Use the va_start macro when specifying the second argument.
va_arg
• In the va_arg macro, the argument ap must be the same as the va_list type object initialized with va_start.
• After the argument pointer ap has been initialized via a call to va_start, parameters are returned via calls to
va_arg, with type being the type of the next parameter. (Each call to va_arg obtains the next value from the
argument list.)
• If the argument pointer ap is a null pointer, 0 (of type type) is returned.
va_end
• The va_end macro sets a null pointer in the argument pointer ap to inform the macro processor that all the
parameters in the variable argument list have been processed.
User’s Manual U15556EJ1V0UM
177