From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11287 invoked by alias); 7 Jul 2004 18:36:31 -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 11275 invoked by uid 48); 7 Jul 2004 18:36:29 -0000 Date: Wed, 07 Jul 2004 18:36:00 -0000 From: "tempa at enigmati dot ca" To: gcc-bugs@gcc.gnu.org Message-ID: <20040707183626.16413.tempa@enigmati.ca> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/16413] New: 3.3 regression: operator() of private member accessible X-Bugzilla-Reason: CC X-SW-Source: 2004-07/txt/msg00665.txt.bz2 List-Id: The following simple code snippet is correctly rejected by versions 2.95 and 3.2, but is accepted by 3.3: class A { public: int operator()(int i) const { return 0; } }; class B { private: A a; }; int main() { return B().a(0); } This happens with both const and non-const operator(), but doesn't seem to happen with other operators. I tried += and operator[], which both correctly generated errors. -- Summary: 3.3 regression: operator() of private member accessible Product: gcc Version: 3.3.4 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tempa at enigmati dot ca CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16413