OSDN Git Service

2010-03-29 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / transparent-union-4.c
1 /* Test for ICE on transparent union with function pointer and
2    -pedantic.  Bug 22240.  */
3 /* Origin: Joseph Myers <joseph@codesourcery.com> */
4 /* { dg-do compile } */
5 /* { dg-options "-pedantic" } */
6
7 typedef union { union w *u; int *i; } H __attribute__ ((transparent_union));
8 void (*h) (H);
9 void g (int *s) { h (s); } /* { dg-warning "ISO C prohibits argument conversion to union type" } */