pretty-print.h (pp_base): Remove.
[official-gcc.git] / gcc / testsuite / gcc.dg / va-arg-pack-1.c
blob09ae97917e4a6f8164ce3ca12b4141383e129c87
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 int bar (int, const char *, int, ...);
5 int baz (int, const char *, long int);
7 int
8 f1 (int x, ...)
10 return bar (5, "", 6, __builtin_va_arg_pack ()); /* { dg-error "invalid use of" } */
13 extern inline __attribute__((always_inline)) int
14 f2 (int y, ...)
16 return bar (y, "", __builtin_va_arg_pack ()); /* { dg-error "invalid use of" } */
19 extern inline __attribute__((always_inline)) int
20 f3 (int y, ...)
22 return bar (y, "", 5, __builtin_va_arg_pack ());
25 extern inline __attribute__((always_inline)) int
26 f4 (int y, ...)
28 return bar (y, "", 4, __builtin_va_arg_pack (), 6); /* { dg-error "invalid use of" } */
31 extern inline __attribute__((always_inline)) int
32 f5 (int y, ...)
34 return baz (y, "", __builtin_va_arg_pack ()); /* { dg-error "invalid use of" } */
37 extern inline __attribute__((always_inline)) int
38 f6 (int y, ...)
40 return __builtin_va_arg_pack (); /* { dg-error "invalid use of" } */
43 int
44 test (void)
46 int a = f2 (5, "a", 6);
47 a += f3 (6, "ab", 17LL);
48 a += f4 (7, 1, 2, 3);
49 a += f5 (8, 7L);
50 a += f6 (9);
51 return a;