c++/9377: g++ 64bit calls wrong function -> Multi-inheritance: pointer to member function of the 2nd base calss points to wrong place
Wolfgang Bangerth
bangerth@ticam.utexas.edu
Tue Jan 21 17:32:00 GMT 2003
> 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/
More information about the Gcc-bugs
mailing list