This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/9377: g++ 64bit calls wrong function -> Multi-inheritance: pointerto member function of the 2nd base calss points to wrong place


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" <axiong@ca.ibm.com>,
   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" <axiong@ca.ibm.com>, 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
 
 
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]