This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9377: g++ 64bit calls wrong function -> Multi-inheritance:pointer to member function of the 2nd base calss points to wrong place
- From: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- To: Andrew Xiong <axiong at ca dot ibm dot com>
- Cc: gcc-bugs at gcc dot gnu dot org, <gcc-gnats at gcc dot gnu dot org>
- Date: Tue, 21 Jan 2003 11:30:30 -0600 (CST)
- Subject: Re: c++/9377: g++ 64bit calls wrong function -> Multi-inheritance:pointer to member function of the 2nd base calss points to wrong place
> 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.
The fact that it works with one compiler and not with the other is of
course no proof of either one being right :-) What I meant is that the
question 32 vs 64 bit affects the layout of the virtual function table, so
I wouldn't be surprised if an accidentially working program breaks when
you change something like the layout of the vt.
That being said, I reopened the report to let others have a second look on
things.
Regards
Wolfgang
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth/