a function. Here is an example:
@smallexample
-#define eprintf(@dots{}) fprintf (stderr, __VA_ARGS__)
+#define eprintf(...) fprintf (stderr, __VA_ARGS__)
@end smallexample
This kind of macro is called @dfn{variadic}. When the macro is invoked,
If your macro is complicated, you may want a more descriptive name for
the variable argument than @code{@w{__VA_ARGS__}}. CPP permits
this, as an extension. You may write an argument name immediately
-before the @samp{@dots{}}; that name is used for the variable argument.
+before the @samp{...}; that name is used for the variable argument.
The @code{eprintf} macro above could be written
@smallexample
-#define eprintf(args@dots{}) fprintf (stderr, args)
+#define eprintf(args...) fprintf (stderr, args)
@end smallexample
@noindent
macro. We could define @code{eprintf} like this, instead:
@smallexample
-#define eprintf(format, @dots{}) fprintf (stderr, format, __VA_ARGS__)
+#define eprintf(format, ...) fprintf (stderr, format, __VA_ARGS__)
@end smallexample
@noindent
not have any tokens, the @code{@w{__VA_OPT__}} expands to nothing:
@smallexample
-#define eprintf(format, @dots{}) \
+#define eprintf(format, ...) \
fprintf (stderr, format __VA_OPT__(,) __VA_ARGS__)
@end smallexample
supported in GNU CPP, for backward compatibility. If you write
@smallexample
-#define eprintf(format, @dots{}) fprintf (stderr, format, ##__VA_ARGS__)
+#define eprintf(format, ...) fprintf (stderr, format, ##__VA_ARGS__)
@end smallexample
@noindent
Variadic macros became a standard part of the C language with C99.
GNU CPP previously supported them
with a named variable argument
-(@samp{args@dots{}}, not @samp{@dots{}} and @code{@w{__VA_ARGS__}}), which
+(@samp{args...}, not @samp{...} and @code{@w{__VA_ARGS__}}), which
is still supported for backward compatibility.
@node Predefined Macros