(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.c-torture/
compile/
pr28865.c
       1  struct var_len
       2  {
       3    int field1;
       4    const char field2[];
       5  };
       6  
       7  /* Note - strictly speaking this array declaration is illegal
       8     since each element has a variable length.  We used to allow
       9     this because it was used in existing code.
      10     Since PR64417 we reject this code.  */
      11  static const struct var_len var_array[] = 
      12  {
      13    { 1, "Long exposure noise reduction" }, /* { dg-error "initialization of flexible array member" } */
      14    { 2, "Shutter/AE lock buttons" }, /* { dg-error "initialization of flexible array member" } */
      15    { 3, "Mirror lockup" } /* { dg-error "initialization of flexible array member" } */
      16  };