This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
inner class bug in g++
- To: gcc-bugs at gcc dot gnu dot org
- Subject: inner class bug in g++
- From: Mo DeJong <mdejong at cygnus dot com>
- Date: Tue, 2 May 2000 11:39:31 -0700 (PDT)
Hello.
There seems to be a bug all versions of g++ related to
protected inner classes. Here is a small example.
class A {
protected:
class Ai { };
};
class B : public A::Ai { };
g++ compiles this without error, but others compilers correctly
reject the code.
eccp --strict kill.cc
"kill.cc", line 6: error: class "A::Ai" is inaccessible
class B : public A::Ai { };
Here is xlC (vacpp v5) says about this on AIX,
1540-0301: (S) The "protected" member "class A::Ai" cannot be accessed.
I hope that helps.
Mo Dejong
Red Hat Inc.