Pointers-to-members

Jim Dehnert dehnert at baalbek.engr.sgi.com
Tue Feb 29 03:42:28 UTC 2000


I've added new issues A-26/27 for the representation of NULL pointers
to members.  But I have a couple of questions:

-- For a pointer to member function, if the function is non-virtual,
   it doesn't seem that one ever needs to worry about the adjustments.
   If it's the same target function address, the only significance of
   the adjustment is how much you modify this before calling it, which
   is a property of the containing class rather than of the target.

-- But if the function is virtual, the "pointer" is an offset into the
   vtable, and if you really want to identify whether the ultimate
   function is the same it gets really messy, especially if you need to
   pass through "thunks" first.  Is this the semantics, or is it much
   simpler for some reason?

-- For a pointer to member data, Jason had me convinced that the
   displacement would never go negative because the bases are allocated
   before additional data members in the derived class, until I thought
   about virtual bases, where that's no longer true.  Is there a C++
   restriction that makes this not a problem, or...?

Jim

-		Jim Dehnert  x3-4272




More information about the cxx-abi-dev mailing list