URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [range-for9.C] - Rev 693
Compare with Previous | Blame | View Log
// Test for range-based for loop error in C++98 mode
// { dg-do compile }
// { dg-options "-std=c++98" }
void test()
{
int a[] = {0,1,2};
for (int x : a) // { dg-error "range-based 'for'" }
;
}