diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-22 15:28:06 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-22 15:28:06 +0000 |
commit | 206d835734b5950879cc78d634692410f0208966 (patch) | |
tree | e522b26caa2d20f25e0ae5a80dbd037ad709e5a2 /gcc/testsuite/gcc.dg/20040322-1.c | |
parent | 90ce0bcbef797e38e8d16238f8cddd1e2d6905e1 (diff) | |
download | gcc-206d835734b5950879cc78d634692410f0208966.tar.gz |
PR c/14069
* c-decl.c (finish_struct): Change type of incorrect flexible array
field into error_mark_node.
* gcc.dg/20040322-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79832 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/20040322-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/20040322-1.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20040322-1.c b/gcc/testsuite/gcc.dg/20040322-1.c new file mode 100644 index 00000000000..af5e0b4820c --- /dev/null +++ b/gcc/testsuite/gcc.dg/20040322-1.c @@ -0,0 +1,4 @@ +/* PR c/14069 */ +/* { dg-do compile } */ +struct S { int a; char b[]; char *c; }; /* { dg-error "error" "flexible array member not" } */ +struct S s = { .b = "foo", .c = .b }; /* { dg-error "error" "parse error before" } */ |