OSDN Git Service

Fix PR42205.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / Wcxx-compat-11.c
1 /* { dg-do compile } */
2 /* { dg-options "-Wc++-compat" } */
3
4 #include <stdarg.h>
5
6 enum E { A };
7
8 extern void f2 (int);
9 void
10 f1 (int n, ...)
11 {
12   va_list ap;
13
14   va_start (ap, n);
15   f2 (va_arg (ap, int));
16   f2 (va_arg (ap, _Bool));      /* { dg-warning "promoted" } */
17   f2 (va_arg (ap, enum E));     /* { dg-warning "promoted" } */
18 }
19
20 /* Match extra informative notes.  */
21 /* { dg-message "note:" "expected" { target *-*-* } 0 } */