* doc/extend.texi (Loop-Specific Pragmas): Document pragma GCC unroll.
[official-gcc.git] / gcc / testsuite / g++.dg / ext / flexary21.C
blob24d330a423bfeb3a480c235372e4334b77c553aa
1 // PR c++/72775
2 // { dg-do compile { target c++11 } }
3 // { dg-options -Wno-pedantic }
5 struct S {
6   int i;
7   char a[];
8   S () : a("bob") {} // { dg-error "initializer for flexible array member" }
9 };
11 struct T {
12   int i;
13   char b[] = "bob";      // { dg-error "initializer for flexible array member" }
14   T () {
15     // the presence of this ctor definition elicits the error above
16     // without it the flexible array initializer would be ignored
17     // and so (unfortunately) not diagnosed
18   }
19   T (int) : b("bob") {}  // { dg-error "initializer for flexible array member" }