This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ ptrmemfun break if FUNCTION_BOUNDARY < 2 * BITS_PER_UNIT
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: C++ ptrmemfun break if FUNCTION_BOUNDARY < 2 * BITS_PER_UNIT
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Fri, 6 Apr 2001 18:52:47 +0100
- Cc: gcc at gcc dot gnu dot org
- References: <ork84ys5bq.fsf@guarana.lsd.ic.unicamp.br>
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.