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]

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


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


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