Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
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" }
;
}