summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/incomplete-typedef-1.c
blob: 622bf6504216d085d739e4d2a1f1244262cb4dd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* { dg-do compile } */
/* { dg-options "" } */

typedef struct S TS;
typedef union U TU;

void
foo (void)
{
  (TS) { }; /* { dg-error "invalid use of incomplete typedef" } */
  (TU) { }; /* { dg-error "invalid use of incomplete typedef" } */
}