blob: eaa5b4068800959be02026a061f9187839a8c6db [file] [log] [blame]
// Test for range-based for loop error in C++98 mode
// { dg-do compile { target { ! c++11 } } }
void test()
{
int a[] = {0,1,2};
for (int x : a) // { dg-error "range-based 'for'|forming reference" }
;
}