You copied the Doc URL to your clipboard.

Variadic macros

In C90 and C++ you can declare a macro to accept a variable number of arguments.

The syntax for declaring a variadic macro in C90 and C++ follows the C99 syntax for declaring a variadic macro, unless the option --gnu is selected. If the option --gnu is specified, the syntax follows GNU syntax for variadic macros.


#define debug(format, ...) fprintf (stderr, format, __VA_ARGS__)
void variadic_macros(void)
    debug ("a test string is printed out along with %x %x %x\n", 12, 14, 20);
Related concepts
Related reference