This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22540] No access to public static members/functions of privately inherited base class
- From: "mdweb at web dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jul 2005 11:14:06 -0000
- Subject: [Bug c++/22540] No access to public static members/functions of privately inherited base class
- References: <20050717231538.22540.mdweb@web.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From mdweb at web dot de 2005-07-18 11:14 -------
Sorry, my sentence with 'inherit directly' was missing the point and probably
misleading.
Both A::foo() and A::i are _static_ public, so they should be accessible
directly. The example above is just a stripped down version of the example in
the C++ standard (1998), 11.2.3, where it says the code should be legal.
Now that I've tried that specific example, I noticed this is also rejected:
class A { };
class B : private A { };
class C : public B {
A a; // ''error: 'class A' is inaccessible''
}
Michael
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Keywords|accepts-invalid |rejects-valid
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22540