OSDN Git Service

* c-c++-common/raw-string-1.c: Combine C and C++ raw string tests.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / ext / complit10.C
1 // PR c++/36023
2 // { dg-do compile }
3 // { dg-options "" }
4
5 struct A;
6
7 void
8 f1 (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
16 f2 ()
17 {
18   (int[]) { 1 };
19   (int[1]) { 1 };
20 }