| 1 |
/* Test C23 variadic functions with no named parameters. Compilation tests, |
| 2 |
invalid code. */ |
| 3 |
/* { dg-do compile } */ |
| 4 |
/* { dg-options "-std=c23 -pedantic-errors" } */ |
| 5 |
|
| 6 |
int f (...); /* { dg-message "previous declaration" } */ |
| 7 |
int f (); /* { dg-error "conflicting types" } */ |
| 8 |
|
| 9 |
int f2 (...); /* { dg-message "previous declaration" } */ |
| 10 |
int f2 (int); /* { dg-error "conflicting types" } */ |
| 11 |
|
| 12 |
int g (); /* { dg-message "previous declaration" } */ |
| 13 |
int g (...); /* { dg-error "conflicting types" } */ |
| 14 |
|
| 15 |
int g2 (int); /* { dg-message "previous declaration" } */ |
| 16 |
int g2 (...); /* { dg-error "conflicting types" } */ |