URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [visibility16.C] - Rev 165
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do assemble }
// GROUPS passed visibility
// visibility file
// From: Marie Trapp <Marie.Trapp@analog.com>
// Date: Thu, 5 Aug 93 11:55:15 EDT
// Subject: access of protected members
// Message-ID: <9308051553.AA07639@nwd2sun1.analog.com>
class A {
protected:
int astuff; // { dg-error "" } protected
A() {
astuff = 3;
}
};
class B : public A {
int bstuff;
public:
B( A *p) {
bstuff = p->astuff;// { dg-error "" } .*
}
};
class C : public A {
int cstuff;
public:
C() {
cstuff = 5;
}
};
int main() {
C cvar;
B bvar(&cvar);
}
Go to most recent revision | Compare with Previous | Blame | View Log