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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [anonymous-namespace-2.C] - Rev 694

Go to most recent revision | Compare with Previous | Blame | View Log

// Test for the warning of exposing types from an anonymous namespace
// { dg-do compile }
//
#include "anonymous-namespace-2.h"

namespace {
    struct good { };
}

struct g1 {
    good * A;
};
struct g2 {
    good * A[1];
};
struct g3 {
    good (*A)[1];
};

#line 21 "foo.C"
struct b1 { // { dg-warning "uses the anonymous namespace" }
    bad * B;
};
struct b2 { // { dg-warning "uses the anonymous namespace" }
    bad * B[1];
};
struct b3 { // { dg-warning "uses the anonymous namespace" }
    bad (*B)[1];
};

Go to most recent revision | 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.