Sign in
gnu
/
gcc
/
cd2fd5facb5e1882d3f338ed456ae9536f7c0593
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
range-for9.C
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" }
;
}