From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12958 invoked by alias); 18 Oct 2003 14:48:45 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 12896 invoked by alias); 18 Oct 2003 14:48:43 -0000 Date: Sat, 18 Oct 2003 14:58:00 -0000 Message-ID: <20031018144843.12895.qmail@sources.redhat.com> From: "gdr at integrable-solutions dot net" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20031018143108.12673.wwieser@gmx.de> References: <20031018143108.12673.wwieser@gmx.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/12673] Possible accept-illegal in access control X-Bugzilla-Reason: CC X-SW-Source: 2003-10/txt/msg01478.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12673 ------- Additional Comments From gdr at integrable-solutions dot net 2003-10-18 14:48 ------- Subject: Re: New: Possible accept-illegal in access control "wwieser at gmx dot de" writes: | I admit that I do not know the C++ standard well enough to be able | to tell which behavior is the correct one. Just cancel my report in | case GCC's current behavior is correct. | | --------------------- | class A | { | private: | int x; | public: | struct B | { | A *a; | void foo() | { a->x=1; } // Hmm: x private member of A This is not a bug in the compiler. The standard has been changed and C++03 says that nested classes are automatically given friendship by the enclosing class. A clear confusion, but nevertheless a standard confusion. The bug can be closed as INVALID. -- Gaby