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]

[Bug c++/30975] ptr to member func __delta is 0 if ptr declaration does not match function porototype



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-02-26 22:56 -------
Well this is undefined code really.  You are calling the function via the wrong
type.

If you do:
    c.t((FPTR)(FPTR1)&C::C_bad);

And use it as a FPTR1, it works.

FPTR1 is defined as:
typedef void (B::*FPTR1)();


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30975


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