PATCH to output_constant

mark@codesourcery.com mark@codesourcery.com
Thu May 20 01:24:00 GMT 1999


>>>>> "Jeffrey" == Jeffrey A Law <law@upchuck.cygnus.com> writes:

    Jeffrey> How difficult would it be to promote PTRMEM_CST out of
    Jeffrey> the cp subdir and into the toplevel tree.def?  I would
    Jeffrey> prefer to avoid too many callbacks, especially for stuff
    Jeffrey> where they can easily be avoided (though I'm not
    Jeffrey> religiously opposed to callbacks like RMS).

Pointers-to-members are a notion that do not occur in most other
languages.  And the logic to figure out what values they have (when
treating them as records, rather than as abstract constants) is
intimately involved with the g++ ABI; vtable layout, virtual bases,
multiple inheritance, and -fnew-abi all play a role.  So, I don't
think it really makes sense to make PTRMEM_CST language-independent.
That *would* be logical if we had a standardized object layout ABI for
all class-based object-oriented languages, i.e., if we made much more
g++'s ABI language-independent.  That might be a sensible long-term
goal, although different languages may have different performance
tradeoffs, implementation requirements, etc.

I'm not sure if I'm being clear.  Do you see what I mean?

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


More information about the Gcc-patches mailing list