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

axiong@ca.ibm.com axiong@ca.ibm.com
Tue Jan 21 22:24:00 GMT 2003


Hi, Wolfgang,

Thanks. For the code:
>         d1ptr = (D*) new B2 ;  //with the cast, we can also do this
>         printf( "%s\n", (d1ptr->*select(1))() ) ;
The expected output from the "printf" is suppose to be:
---------------------------------------
B2::bar() is called

More information: both 32-bit g++ and 64-bit g++ (Linuc PPC) give correct
output for it, and also
xlC on AIX gives correct output for it (B2::bar() is called).

Regards,

Andrew



More information about the Gcc-bugs mailing list