diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/union-cast-4.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/union-cast-4.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/union-cast-4.c b/gcc/testsuite/gcc.dg/union-cast-4.c new file mode 100644 index 000000000..a1c98ba14 --- /dev/null +++ b/gcc/testsuite/gcc.dg/union-cast-4.c @@ -0,0 +1,8 @@ +/* PR c/35748 */ + +union U { void x[1]; }; /* { dg-error "array of voids" } */ + +void foo() +{ + (union U)0; /* { dg-error "type not present" } */ +} |