Debian Codegraph @

gcc/testsuite/g++.dg/warn/Wvla-2.C

raw
1 /* { dg-do compile { target { ! c++14 } } } */
2 /* { dg-options "-pedantic-errors -Wvla" } */
3
4 void func (int i)
5 {
6 int array[i]; /* { dg-error "7:ISO C.* forbids variable.* array 'array'" } */
7 }