From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30343 invoked by alias); 19 Feb 2003 23:37:14 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 30331 invoked from network); 19 Feb 2003 23:37:14 -0000 Received: from unknown (HELO fencepost.gnu.org) (199.232.76.164) by 172.16.49.205 with SMTP; 19 Feb 2003 23:37:14 -0000 Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.10) id 18ldm5-0007TP-00 for gcc@gnu.org; Wed, 19 Feb 2003 18:37:13 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18ldlE-0006I5-00 for gcc@gnu.org; Wed, 19 Feb 2003 18:36:21 -0500 Received: from 213-152-55-49.dsl.eclipse.net.uk ([213.152.55.49] helo=monkey.daikokuya.co.uk) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18ldkx-00069Q-00 for gcc@gnu.org; Wed, 19 Feb 2003 18:36:03 -0500 Received: from neil by monkey.daikokuya.co.uk with local (Exim 3.36 #1 (Debian)) id 18ldks-0003JI-00; Wed, 19 Feb 2003 23:35:58 +0000 Date: Wed, 19 Feb 2003 23:41:00 -0000 From: Neil Booth To: Mongryong Cc: gcc@gnu.org Subject: Re: C++ Protected Class Members are Private??? Message-ID: <20030219233558.GA12687@daikokuya.co.uk> References: <1045681848.1364.18.camel@refugeeMedia> <20030219205407.GE10335@daikokuya.co.uk> <1045695785.1358.40.camel@refugeeMedia> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1045695785.1358.40.camel@refugeeMedia> User-Agent: Mutt/1.5.3i X-Spam-Status: No, hits=-13.3 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01, TO_LOCALPART_EQ_REAL,USER_AGENT,USER_AGENT_MUTT version=2.41 X-Spam-Level: X-SW-Source: 2003-02/txt/msg01323.txt.bz2 Mongryong wrote:- > On Wed, 2003-02-19 at 15:54, Neil Booth wrote: > > Mongryong wrote:- > > > > > // now, this generates a compiler error!!! > > > // right->left: left is protected and can't be accessed?? > > > left = right->left; > > > > left = this->left is OK, but not right->left because it's a different > > object. At least, that's my understanding. Welcome to C++. > > > This has got to be a compiler issue. The compiler knows the context and > scope from which 'right->left' is called and should be able to determine > that it's 'okay'. It's kind of dumb for C++ to define this behaviour as > not okay. No, it's a language issue. Neil.