private base class doesn't seem to be

David C Binderman
Mon Nov 9 07:30:00 GMT 1998

At 12:43 AM 11/6/98 +0100, you wrote:
>As usual, you don't indicate *why* you think this code should be

Because it is an example of an outbreak of C++ compiler disagreement.

When N (N >= 2) other compilers reject the code, but GNU accepts it, 
then my suspicions lie with GNU.

I've given up on trying to encourage vendors to stick to the standard,
because it is too complex to understand, and am concentrating instead
on the easier target of getting assorted compilers to agree, wether to the 
standard or not.

I don't have time to fish about in the C++ standard. Sorry,
but I'll leave that one to the language lawyers.

>In my reading of the standard, it is well-formed.

Fair enough. 

>Base1 is accessible, if an invented public member in Base1 is
>accessible. This invented member is protected in Int2. Therefore, it
>is accessible in Der. In addition, the access in f goes through a
>pointer to Der. Therefore, Base1 is accessible in Der::f, and pDer can
>be implicitly cast to Base1.

Sorry, don't understand. 

I think Base1 is a private base class of
Der, and my understanding of private base classes is that they don't
convert to derived classes.

I could be wrong.

David C Binderman MSc BSc	+44 1293 534847

More information about the Gcc-bugs mailing list