From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7919 invoked by alias); 18 Oct 2003 14:31:13 -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 7909 invoked by uid 48); 18 Oct 2003 14:31:12 -0000 Date: Sat, 18 Oct 2003 14:48:00 -0000 From: "wwieser at gmx dot de" To: gcc-bugs@gcc.gnu.org Message-ID: <20031018143108.12673.wwieser@gmx.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/12673] New: Possible accept-illegal in access control X-Bugzilla-Reason: CC X-SW-Source: 2003-10/txt/msg01477.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 Summary: Possible accept-illegal in access control Product: gcc Version: 3.3.2 Status: UNCONFIRMED Severity: minor Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: wwieser at gmx dot de CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-linux-gnu GCC host triplet: i686-linux-gnu GCC target triplet: i686-linux-gnu The following code compiles cleanly using gcc (GCC) 3.3.2 20031003 (prerelease) If I recall correctly, this short of code was accepted by gcc-2.95 then rejected by earlier gcc-3 versions and with gcc-3.3.2 it compiles cleanly again. 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 }; }; void bar() { A a; A::B b; b.a=&a; b.foo(); }