gcc/testsuite/gcc.dg/cpp/c23-va-opt-1.c
raw| 1 | /* Test __VA_OPT__ and no "..." arguments in a call to a variable-arguments |
| 2 | macro accepted for C23. */ |
| 3 | /* { dg-do preprocess } */ |
| 4 | /* { dg-options "-std=c23 -pedantic-errors" } */ |
| 5 | |
| 6 | #define CALL(F, ...) F (7 __VA_OPT__(,) __VA_ARGS__) |
| 7 | #define M(X, ...) X |
| 8 | |
| 9 | CALL (a); |
| 10 | CALL (b, 1); |
| 11 | M (x); |