aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c23-stdarg-3.c
blob: 10d97db5e6f050ec943eb6e2a3c43cc24302d724 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Test C23 variadic functions with no named parameters.  Compilation tests,
   invalid code.  */
/* { dg-do compile } */
/* { dg-options "-std=c23 -pedantic-errors" } */

int f (...); /* { dg-message "previous declaration" } */
int f (); /* { dg-error "conflicting types" } */

int f2 (...); /* { dg-message "previous declaration" } */
int f2 (int); /* { dg-error "conflicting types" } */

int g (); /* { dg-message "previous declaration" } */
int g (...); /* { dg-error "conflicting types" } */

int g2 (int); /* { dg-message "previous declaration" } */
int g2 (...); /* { dg-error "conflicting types" } */