This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RH 7 g++ inheritance problem


This is from the RPM that Red Hat has on their site, version 2.96 20000724
(experimental) plus a bunch of patches, compiled on i686 linux.


This source:


class A {
};
class B : private A {
};
class C : protected B {
	public:
		static A a;
};
static A a;


gives this message:

/tmp/private.cc:1: `class A' is inaccessible
/tmp/private.cc:7: within this context



That doesn't make sense to me. Of course, it may not be that way in a later
snapshot. I can't keep up with the snapshots any more; they haven't been
stable enough to really even offer bug reports for as a compiler layman.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]