summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/Wvla-2.C
blob: ba83ac1a9f2358d6ae6c7b4efe051ec612b9b1f4 (plain)
1
2
3
4
5
6
7
/* { dg-do compile } */
/* { dg-options "-pedantic-errors -Wvla" } */

void func (int i)
{
  int array[i]; /* { dg-error "ISO C.* forbids variable.* array 'array'" } */
}