8sa1-gcc/gcc/testsuite/g++.old-deja/g++.law/visibility9.C
Jeff Law 921e5a0eb4 Initial revision
From-SVN: r14840
1997-08-19 01:34:40 -06:00

23 lines
430 B
C

// 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;
};
class B : public A {
public:
void f1(A* pa);
};
void B::f1(A* pa) {
pa->a = 1; // illegal but allowed by gcc// ERROR - .*
}