Add new test to verify that the array index, limit, and stride are
[official-gcc.git] / gcc / testsuite / gcc.dg / Wcxx-compat-11.c
blob8818338ad5e5a7521d79611c53e8c362170c5066
1 /* { dg-do compile } */
2 /* { dg-options "-Wc++-compat" } */
4 #include <stdarg.h>
6 enum E { A };
8 extern void f2 (int);
9 void
10 f1 (int n, ...)
12 va_list ap;
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" } */
20 /* Match extra informative notes. */
21 /* { dg-message "note:" "expected" { target *-*-* } 0 } */