Added support for variadic macros (as in C99).
[splint-patched.git] / test / variadicmacro.c
blobc39618deff580c2f98484ccaa5aae082d6d213db
1 #include <stdio.h>
3 #define m(o, ...) fprintf(o, __VA_ARGS__)
4 #define merr(...) fprintf(stderr, __VA_ARGS__)
6 /* gnu-extension: name for the variadic arguments list */
7 #define n(o, args...) fprintf(o, args)
8 #define nerr(args...) fprintf(stderr, args)
10 int
11 main(void)
13 m(stderr, "1 = %s\n", "one");
14 merr("2 = %s\n", "two");
16 n(stderr, "3 = %s\n", "three");
17 nerr("4 = %s\n", "four");
19 return 0;