This is the mail archive of the gcc-bugs@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] | |
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] |