[Bug c++/30975] ptr to member func __delta is 0 if ptr declaration does not match function porototype
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Fri Mar 9 04:41:00 GMT 2007
------- Comment #4 from bangerth at dealii dot org 2007-03-09 04:40 -------
What exactly are you trying to achieve here:
-------------
typedef void (B::*FPTR)(int);
...
struct C : public A , public B {
virtual void C_bad() { }
};
c.t((FPTR)&C::C_bad);
------------------
Clearly, C::Cbad is a void function, but you assign it to a pointer to a
function that takes an int. That can't possibly work. Indeed, if you let
C_bad take an int, the segfault goes away.
W.
--
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bangerth at dealii dot org
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30975
More information about the Gcc-bugs
mailing list