libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / c23-stdarg-2.c
blob3499366f96d94c0a248e840b680535e467a7fbc3
1 /* Test C23 variadic functions with no named parameters. Compilation tests,
2 valid code, verify not considered unprototyped functions. */
3 /* { dg-do compile } */
4 /* { dg-options "-std=c23 -pedantic-errors -Wstrict-prototypes -Wold-style-definition" } */
6 int f (...);
7 int g (int (...));
8 int h (...) { return 0; }
10 typedef int A[];
11 typedef int A2[2];
13 A *f1 (...);
14 A2 *f1 (...);
15 A *f1 (...) { return 0; }
17 A2 *f2 (...);
18 A *f2 (...);
19 A2 *f2 (...) { return 0; }
20 typeof (f1) f2;
22 int t () { return f () + f (1) + f (1, 2) + h () + h (1.5, 2, f1) + g (f); }