diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-11 02:37:37 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-11 02:37:37 +0000 |
commit | e13656bf80e97f3065a8cedd0f38adf1bbc92079 (patch) | |
tree | 5bee4124db3aa41812d918dd7cf3440d0adfdeec /gcc/testsuite/gcc.dg/c99-flex-array-2.c | |
parent | e40a1d5cab338fbc758b0b7a9ae82f69174cce90 (diff) | |
download | gcc-e13656bf80e97f3065a8cedd0f38adf1bbc92079.tar.gz |
New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49664 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/c99-flex-array-2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/c99-flex-array-2.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/c99-flex-array-2.c b/gcc/testsuite/gcc.dg/c99-flex-array-2.c new file mode 100644 index 00000000000..299abef6543 --- /dev/null +++ b/gcc/testsuite/gcc.dg/c99-flex-array-2.c @@ -0,0 +1,13 @@ +/* PR c/5623 */ +/* { dg-do compile } */ + +struct blah { + int number; + char array[]; +}; + +void foo(void) +{ + struct blah b; + b.array = "hi"; /* { dg-error "invalid use of flexible array member" } */ +} |