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/] [union2.C] - Rev 165
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do assemble }
// GROUPS passed unions
// anon-union file
// From: gerlek@dat.cse.ogi.edu (Michael Gerlek)
// Date: Tue, 8 Dec 92 12:56 PST
// Subject: private anonymous unions have public members? (gcc-2.3.1)
// Message-ID: <m0mzByL-0000hoC@dat.cse.ogi.edu>
class A {
public:
int x;
private:
int y; // { dg-error "" } private
union {
int z; // { dg-error "" } private
};
};
void f() {
A a;
a.x = 0;
a.y = 1;// { dg-error "" } .*
a.z = 2;// { dg-error "" }
}
Go to most recent revision | Compare with Previous | Blame | View Log