Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/pr85515-2.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
line wrap: on
line source
// { dg-require-effective-target c++11 } void test_1 () { int arr[] = {1, 2, 3, 4, 5}; for (const auto v: arr) { _forbegin; // { dg-bogus "suggested alternative" } // { dg-error "'_forbegin' was not declared in this scope" "" { target *-*-*} .-1 } } } int test_2 () { int arr[] = {1, 2, 3, 4, 5}; int sum = 0; for (const auto v: arr) { sum += v; __for_begin = __for_end; // { dg-error "was not declared in this scope" } } return sum; }