| 1 |
/* PR c/65901 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "" } */ |
| 4 |
|
| 5 |
struct S; |
| 6 |
enum E; |
| 7 |
union U; |
| 8 |
|
| 9 |
void |
| 10 |
foo (__builtin_va_list ap) |
| 11 |
{ |
| 12 |
__builtin_va_arg (ap, void); /* { dg-error "second argument to .va_arg. is of incomplete type .void." } */ |
| 13 |
__builtin_va_arg (ap, struct S); /* { dg-error "second argument to .va_arg. is of incomplete type .struct S." } */ |
| 14 |
__builtin_va_arg (ap, enum E); /* { dg-error "second argument to .va_arg. is of incomplete type .enum E." } */ |
| 15 |
__builtin_va_arg (ap, union U); /* { dg-error "second argument to .va_arg. is of incomplete type .union U." } */ |
| 16 |
} |