summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/range-for29.C
blob: 64ad950927c337e2729aabb0eb165cfe6f69c9fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// PR c++/63985
// { dg-require-effective-target c++11 }

void foo()
{
  int arr;

  for (int i = 5: arr)  // { dg-error "initializer in range-based" }
    ;

  for (int i, j: arr)   // { dg-error "multiple declarations in range-based" }
    ;
}