OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [range-for16.C] - Rev 693

Compare with Previous | Blame | View Log

// Test for range-based for loop with arrays of
// incomplete type or unknown size

// { dg-do compile }
// { dg-options "-std=c++0x" }

extern int a[10];
extern int b[];

struct S;
extern S c[10];
extern S d[];

void test()
{
    for (int n : a);
    for (int n : b); // { dg-error "incomplete type" }
    for (S &n : c); // { dg-error "incomplete type" }
    for (S &n : d); // { dg-error "incomplete type" }
    for (int n : *c); // { dg-error "incomplete type" }
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.