blob: c5f79aa2f802949d17618467b693adb9f34870a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// { dg-do compile }
// { dg-options "" }
int
main (int argc, char **argv)
{
typedef char A[argc];
new A; // { dg-warning "variable-length array types|not a constant" }
new A[0]; // { dg-error "must be constant|not a constant" }
new A[5]; // { dg-error "must be constant|not a constant" }
new (A[0]); // { dg-error "must be constant|not a constant" }
new (A[5]); // { dg-error "must be constant|not a constant" }
}
|