This is the mail archive of the gcc@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]

Re: C++ ptrmemfun break if FUNCTION_BOUNDARY < 2 * BITS_PER_UNIT


Alexandre Oliva wrote:-

> The C++ ABI v3 uses the least significant bit of the pfn to tell
> non-virtual from virtual functions.  The problem is that, on
> architectures that don't impose any alignment requirements on
> beginning of functions, the assumption that pfn&1 == 0 for pointers to
> non-virtual member functions doesn't always hold.  This breaks C++ on
> at least avr, elxsi, mn10200, mn10300 and pj.

Presumably those archs where you can't use the low bit have a small
memory space anyway.  Maybe the address types are wide enough that you
can use the high bit instead?  That'd allow you to just define a macro

VIRTUAL_FUNCTION_BIT

and mask with that.  Or maybe I have no idea what I'm talking about :-)

Neil.


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