On Mon, Oct 13, 2003 at 06:28:21PM -0700, Matt Austern wrote:
It's not that hard. Currently we've got four cases for polymorphic
classes:
Which really reduce to two: your case 1 where we use the cfront trick,
and everything else where we can't.
I'm describing what the compiler currently does, by the way, not my
proposal.
And currently we make the vtable weak for all four cases.
My proposal is to change the compiler, for Darwin only, so that it
only
makes the vtables weak for cases 2-4. I don't see any good reason to
make
that change on any other platforms, but I'd be happy to do it if
anyone
can
think of a reason why it would be an improvement.
There's the maintainance issue: maintainers forever more will have to
ask themselves why Darwin is different, even though some other OSes
have similar issues with weak symbols.
I think that just making the change everywhere would be better.
For one thing, x86/ELF using developers will notice that they have
broken Darwin a bit earlier. :-)
In fact, anything that can be done to easily reduce the number of
special cases, multiple ways of doing things, and OS-specific tweaks
in gcc that aren't really needed will pay off in the long run.