* doc/extend.texi (Loop-Specific Pragmas): Document pragma GCC unroll.
[official-gcc.git] / gcc / testsuite / g++.dg / ext / flexary10.C
blob4d1ff56e49b90fa18173a5b0c73cafd2fe6bdac0
1 // PR c++/68490 - error initializing a structure with a flexible array member
2 // { dg-do compile }
3 // { dg-options "-Wpedantic" }
5 struct A {
6   int n;
7   int a[];  // { dg-warning "forbids flexible array member" }
8 };
10 struct A foo (void)
12   // Verify the initializer below is accepted for compatibility with gcc
13   // (in C mode).
14   static struct A
15     a = { 2, { 1, 0 } };   // { dg-warning "initialization of a flexible array member" }
17   return a;