Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.c-torture/compile/pr28865.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
struct var_len { int field1; const char field2[]; }; /* Note - strictly speaking this array declaration is illegal since each element has a variable length. We used to allow this because it was used in existing code. Since PR64417 we reject this code. */ static const struct var_len var_array[] = { { 1, "Long exposure noise reduction" }, /* { dg-error "initialization of flexible array member" } */ { 2, "Shutter/AE lock buttons" }, /* { dg-error "initialization of flexible array member" } */ { 3, "Mirror lockup" } /* { dg-error "initialization of flexible array member" } */ };