This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20397] g++ rejects valid code with 'is inaccessible' error
- From: "s dot franke at bebbosoft dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Mar 2010 19:26:05 -0000
- Subject: [Bug c++/20397] g++ rejects valid code with 'is inaccessible' error
- References: <bug-20397-10237@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from s dot franke at bebbosoft dot de 2010-03-03 19:26 -------
The C++ Standard says:
3.4 Name lookup
The name lookup rules apply uniformly to all names (including typedef-names
(7.1.3), namespace-names (7.3) and class-names (9.1)) wherever the grammar
allows such names in the context discussed by a particular rule. Name lookup
associates the use of a name with a declaration (3.1) of that name. Name lookup
shall find an unambiguous declaration for the name (see 10.2). ..."
The use of a base class ( class B : A ) is not a declaration of A.
Thus the base class ( class A ) is visible and not private.
Reopen the bug and fix it.
Thanks
SF
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20397