From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25737 invoked by alias); 17 May 2005 06:14:39 -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 25718 invoked by uid 48); 17 May 2005 06:14:36 -0000 Date: Tue, 17 May 2005 06:14:00 -0000 From: "yuri at tsoft dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20050517061434.21614.yuri@tsoft.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/21614] New: invokation of undefined class'es method is ignored X-Bugzilla-Reason: CC X-SW-Source: 2005-05/txt/msg02270.txt.bz2 List-Id: gcc 4.0.0 generates code that has line (**) ignored (nothing is invoked in it's place). I am not sure in what kind of relationship does this code stand with C++ standard. But although structure X::Z is undefined, technically method Y::r can be invoked safely since X::Z definition isn't required for this. This code used to compile and work fine -- line (**) was invoked. Yuri --begin code-- class X; class Y; class X { public: struct Z; typedef void (Z::* R) (unsigned int ss); void rr (unsigned int ss); Y* d; }; class Y { public: X::R r; X::Z* d; Y* n; Y(X::R _r, X::Z* _d) : r(_r), d(_d) { } }; extern void ck(); void X::rr (unsigned int ss) { for (Y* l = d; l; l = l->n) { ck(); ((l->d)->*(l->r))(ss); // (**) ignored line ck(); } } --end code-- -- Summary: invokation of undefined class'es method is ignored Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: critical Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: yuri at tsoft dot com CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21614