OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / vaarg3.C
1 // { dg-do assemble  }
2 // Copyright (C) 2000 Free Software Foundation
3 // Contributed by Nathan Sidwell 22 June 2000 <nathan@codesourcery.com>
4
5 #include <stdarg.h>
6
7 struct A {
8   virtual ~A () {};
9 };
10
11 template <class Type>
12 void PrintArgs (Type somearg, ...)
13
14 va_list argp;
15 va_start (argp, somearg);
16 Type value;
17 value = va_arg (argp, Type); // { dg-error "" } cannot pass non-POD
18 va_end (argp);
19 }
20
21 int main (void)
22 {
23 A dummy;
24 PrintArgs (dummy, dummy); // { dg-error "" } cannot pass non-POD
25 return 0;
26 }