Debian Codegraph @

gcc/testsuite/g++.dg/expr/stdarg3.C

raw
1 // PR c++/70084
2 // { dg-do compile }
3
4 #include <stdarg.h>
5
6 struct A
7 {
8 A (const char *f, ...);
9 };
10
11 A::A (const char *f, ...)
12 {
13 va_list ap;
14 va_start (ap, f);
15 int i = va_arg (ap, int); // { dg-bogus "first argument to 'va_arg' not of type 'va_list'" }
16 int j = va_arg ((ap), int); // { dg-bogus "first argument to 'va_arg' not of type 'va_list'" }
17 va_end (ap);
18 }