summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gcc.dg/transparent-union-2.c
blob: f466c4aa2be582cfec3fc19b9e38d447ab8122ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* PR c/20043 */
/* { dg-compile } */
/* { dg-options "-std=gnu99" } */

typedef union { int *i; long *l; } U
  __attribute__((transparent_union));

extern void f0 (U);		/* { dg-error "previous declaration" } */
extern void f0 (void *);	/* { dg-error "conflicting types" } */

extern void f1 (U);		/* { dg-error "previous declaration" } */
extern void f1 (unsigned long);	/* { dg-error "conflicting types" } */

extern void f2 (void *);	/* { dg-error "previous declaration" } */
extern void f2 (U);		/* { dg-error "conflicting types" } */

extern void f3 (unsigned long);	/* { dg-error "previous declaration" } */
extern void f3 (U);		/* { dg-error "conflicting types" } */
OpenPOWER on IntegriCloud