1 // PR c++/36023 2 // { dg-do compile } 3 // { dg-options "" } 4 5 struct A; 6 7 void f1(int i)8f1 (int i) 9 { 10 (int[i]) { 1 }; // { dg-error "variable-sized compound literal" } 11 (A[5]) { 1 }; // { dg-error "have incomplete type" } 12 (A[i]) { 1 }; // { dg-error "have incomplete type" } 13 } 14 15 void f2()16f2 () 17 { 18 (int[]) { 1 }; 19 (int[1]) { 1 }; 20 } 21