Debian Codegraph @

gcc/testsuite/g++.dg/ext/constexpr-vla5.C

raw
1 // PR c++/84559
2 // { dg-do compile { target c++11 } }
3
4 void foo(int i)
5 {
6 constexpr char x[i] = ""; // { dg-error "18:.constexpr. variable .x. has variably-modified type" }
7 // { dg-error "18:ISO C\\+\\+ forbids variable length array .x" "" { target c++11 } .-1 }
8 }