PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / init / new35.C
blob7d07cf57f86594daf3812d832e186f3cfe2032f0
1 // { dg-do compile }
2 // { dg-options "" }
4 int
5 main (int argc, char **argv)
7   typedef char A[argc];
8   new A; // { dg-warning "array" }
9   new A[0]; // { dg-error "must be constant|not a constant" }
10   new A[5]; // { dg-error "must be constant|not a constant" }
11   new (A[0]); // { dg-error "must be constant|not a constant" }
12   new (A[5]); // { dg-error "must be constant|not a constant" }