Inheritance Problem

Brian Osman bosman1@nycap.rr.com
Thu May 10 08:18:00 GMT 2001


That was my initial reaction, but I'm not so sure. Look at 11.5 in the
standard. From my quick reading, it sounds like Carlo (and thus, the
compiler) is correct.

-Brian

----- Original Message -----
From: "Joe Buck" <jbuck@synopsys.COM>
To: "Carlo Wood" <carlo@alinoe.com>
Cc: "Olaf Petzold" <opetzold@wit.regiocom.net>; <gcc@gcc.gnu.org>
Sent: Thursday, May 10, 2001 10:52 AM
Subject: Re: Inheritance Problem


>
> > "protected:" means that a derived class has access to that
> > member when it is a member of the same instance.
>
> This is not correct.  In C++, access protection is based on classes,
> not instances.  The object pointed to by "this" has no special status.
>



More information about the Gcc mailing list