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]
Other format: [Raw text]

[Bug c++/22540] No access to public static members/functions of privately inherited base class


------- 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


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