blob: eb08ca2642f1a024723abaa2f821958d56c9189a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// { dg-do assemble }
// GROUPS passed old-abort
extern "C" int printf (const char *, ...);
class A {
int i; // { dg-error "" } private
int j; // { dg-error "" } private
public:
int h;
A() { i=10; j=20; }
virtual void f1() { printf("i=%d j=%d\n",i,j); }
friend virtual void f2() { printf("i=%d j=%d\n",i,j); }// { dg-error "" } virtual.*
};
class B : public A {
public:
virtual void f1() { printf("i=%d j=%d\n",i,j); }// { dg-error "" } member.*// ERROR - member.*
friend virtual void f2() { printf("i=%d j=%d\n",i,j); }// { dg-error "" } virtual.*// ERROR - member.*// ERROR - member.*
};
int
main() {
A * a = new A;
}
|