libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / c23-unproto-2.c
blobc21a148936044bf7bb5d9fda8b48669925044403
1 /* Test compatibility of prototyped function types without arguments and with
2 variable arguments (C23 made the case of types affected by default argument
3 promotions compatible, before removing unprototyped functions completely).
4 Test always-invalid-in-C23 usages, in C23 mode. */
5 /* { dg-do compile } */
6 /* { dg-options "-std=c23 -pedantic-errors" } */
8 void f1 (); /* { dg-message "previous declaration" } */
9 void f1 (int, ...); /* { dg-error "conflicting types" } */
11 void f2 (int, ...); /* { dg-message "previous declaration" } */
12 void f2 (); /* { dg-error "conflicting types" } */
14 void f3 (); /* { dg-message "previous declaration" } */
15 void f3 (char, ...); /* { dg-error "conflicting types" } */
17 void f4 (char, ...); /* { dg-message "previous declaration" } */
18 void f4 (); /* { dg-error "conflicting types" } */