mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-25 22:04:07 +08:00
New.
From-SVN: r49664
This commit is contained in:
parent
fba78abb53
commit
2613bd56ac
13
gcc/testsuite/gcc.dg/c99-flex-array-2.c
Normal file
13
gcc/testsuite/gcc.dg/c99-flex-array-2.c
Normal file
@ -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" } */
|
||||
}
|
Loading…
Reference in New Issue
Block a user