aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/visibility9.C
blob: 4b0ab333be0d90e9cac175c2d5c7c8611b761fc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Build don't link: 
// GROUPS passed visibility
// visibility file
// rom: roland@jts.com (Roland Knight )
// Date:     Sat, 8 May 1993 17:27:35 -0400
// Subject:  gcc 2.3.3 protected member access bug
// Message-ID: <9305082127.AA19577@icepick.jts.com>

class A {
protected:
    int a; // ERROR - protected
};

class B : public A {
public:
    void f1(A* pa);
};


void B::f1(A* pa) {
    pa->a = 1;    // illegal but allowed by gcc// ERROR - .*
}