From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13456 invoked by alias); 21 Jan 2003 17:06:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 13439 invoked by uid 71); 21 Jan 2003 17:06:00 -0000 Date: Tue, 21 Jan 2003 17:06:00 -0000 Message-ID: <20030121170600.13438.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: axiong@ca.ibm.com Subject: Re: c++/9377: g++ 64bit calls wrong function -> Multi-inheritance: pointer to member function of the 2nd base calss points to wrong place Reply-To: axiong@ca.ibm.com X-SW-Source: 2003-01/txt/msg01153.txt.bz2 List-Id: The following reply was made to PR c++/9377; it has been noted by GNATS. From: axiong@ca.ibm.com To: bangerth@dealii.org, "Andrew Xiong" , gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Cc: Subject: Re: c++/9377: g++ 64bit calls wrong function -> Multi-inheritance: pointer to member function of the 2nd base calss points to wrong place Date: Tue, 21 Jan 2003 12:04:20 -0500 Actually, with the C++ compiler (xlC) on AIX, for both 32-bit and 64-bit compiling, we can do: PMF aPMF = (char *(D::*)()) &B2::bar ; And also, with g++ for 32-bit compiling, we can do: PMF aPMF = (char *(D::*)()) &B2::bar ; The problem is only for g++ 64-bit compiling: we can not do it only for g++ 64-bit compiling. I believe that the code is correct accorging to standard C++. Please take a look. Regards, Andrew bangerth@dealii.o rg To: "Andrew Xiong" , gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org 01/21/2003 11:20 cc: AM Subject: Re: c++/9377: g++ 64bit calls wrong function -> Multi-inheritance: pointer to Please respond to member function of the 2nd base calss points to wrong place bangerth; Please respond to "Andrew Xiong"; Please respond to gcc-bugs; Please respond to gcc-prs; Please respond to nobody; Please respond to gcc-gnats Synopsis: g++ 64bit calls wrong function -> Multi-inheritance: pointer to member function of the 2nd base calss points to wrong place State-Changed-From-To: open->closed State-Changed-By: bangerth State-Changed-When: Tue Jan 21 16:20:51 2003 State-Changed-Why: You can't do this: PMF aPMF = (char *(D::*)()) &B2::bar ; If you want to call B2::bar with a pointer to a D object, then you will have to take its address as &D::bar W. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9377