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