Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/pr63996.C

raw
1 // { dg-do compile { target c++14 } }
2
3 constexpr int
4 foo (int i)
5 {
6 int a[i] = { }; // { dg-error "7:ISO C\\+\\+ forbids variable length array .a" }
7 if (i == 23) return 0;
8 }
9
10 constexpr int j = foo (1);