2018-06-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr65901.c
blobb40eea3339276880cb529f0c877eeebb3d067083
1 /* PR c/65901 */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
5 struct S;
6 enum E;
7 union U;
9 void
10 foo (__builtin_va_list ap)
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." } */