| 1 |
// { dg-do assemble } |
| 2 |
// { dg-options "-Wconditionally-supported" } |
| 3 |
// Copyright (C) 2000 Free Software Foundation |
| 4 |
// Contributed by Nathan Sidwell 22 June 2000 <[email protected]> |
| 5 |
|
| 6 |
#include <stdarg.h> |
| 7 |
|
| 8 |
struct A { |
| 9 |
virtual ~A () {} |
| 10 |
}; |
| 11 |
|
| 12 |
template <class Type> |
| 13 |
void PrintArgs (Type somearg, ...) |
| 14 |
{ |
| 15 |
va_list argp; |
| 16 |
va_start (argp, somearg); |
| 17 |
Type value; |
| 18 |
value = va_arg (argp, Type); // { dg-message "receiv" } cannot pass non-POD |
| 19 |
va_end (argp); |
| 20 |
} |
| 21 |
|
| 22 |
int main (void) |
| 23 |
{ |
| 24 |
A dummy; |
| 25 |
PrintArgs (dummy, dummy); // { dg-message "pass" } cannot pass non-POD |
| 26 |
// { dg-message "required" "inst" { target *-*-* } .-1 } |
| 27 |
return 0; |
| 28 |
} |