This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Why don't we just FIX the damn vthunk problem?
- To: Jason Merrill <jason at cygnus dot com>
- Subject: Re: Why don't we just FIX the damn vthunk problem?
- From: Lee Iverson <leei at ai dot sri dot com>
- Date: Mon, 01 Mar 1999 11:34:57 -0800
- cc: jce2 at po dot cwru dot edu (Jason Eager), egcs at cygnus dot com, egcs-bugs at cygnus dot com
In message <u9pv6t91n4.fsf@yorick.cygnus.com> you write:
> >>>>> Jason Eager <jce2@po.cwru.edu> writes:
>
> > After all, it's not like a problem that hasn't been solved before... It
> > is a BIG problem when a compiler doesn't create valid code no matter how
> > "obscure" the feature may be (and anyone who wants to enjoy the full
> > benefits of C++ will probably use multiple inheritence sooner or
> > later..
>
> The problem only occurs if you call virtual functions from constructors of
> virtual bases, which seems a bit odd to me, but I agree it should be fixed.
It is interesting then that introducing a warning in
expand_indirect_vtbls_init to accompany the
/* We don't have dynamic thunks yet!
So for now, just fail silently. */
comment causes more than a half-dozen warnings when compiling
libstdc++.
> > Are there any design documents for egcs? I'll just start working on
> > implimenting vthunks..but I'd be interested to hear about approaches
> > that you've thought of for implimenting the vthunks....
>
> The static way, which EDG and IBM use, is to write out separate [cd]tor
> vtables along with the normal ones and pass them down into base [cd]tors.
> Obviously, this means you use more space in the executable.
Given my respect for EDG and annoyance at Microsoft's patent, I'd say
that this is the way to go and would be willing to give it a try.
I'll need some more details on what exactly needs to be done and what I
can read to understand the issues.
-------------------------------------------------------------------------------
Lee Iverson SRI International
leei@ai.sri.com 333 Ravenswood Ave., Menlo Park CA 94025
http://www.ai.sri.com/~leei/ (650) 859-3307