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]
Other format: [Raw text]

Re: How does virtual function dispatch work in gcc?


Thanks.

I'm trying to understand what I see in gcc's parse tree for C++ programs
with virtual functions.

>From reading the documentation you point to, it seems that even at the
parse-tree level, things are highly platform dependent - much more than for
the case of the C parse tree.
Is that correct?

Would you know of any additional documentation which describes these vtable
issues more at the level of the parse tree?

--dennis.


----- Original Message -----
From: "Joe Buck" <jbuck@synopsys.com>
To: "Dennis Dams" <dennis@research.bell-labs.com>
Cc: <gcc@gcc.gnu.org>
Sent: Friday, January 17, 2003 2:15 PM
Subject: Re: How does virtual function dispatch work in gcc?


> On Fri, Jan 17, 2003 at 01:13:17PM -0500, Dennis Dams wrote:
> > Can someone give me (or point me to) an explanation of how the virtual
> > function dispatch mechanism works in gcc?
> > thanks,
>
> Every compiler I've ever heard of uses a virtual function table (vtable),
> and each object that has virtual functions has a pointer to the vtable for
> its class.  But I presume that you know that and you'll looking for the
> nitty-gritty details.
>
> At least for the ia32 and ia64 platforms, see
>
> http://www.codesourcery.com/cxx-abi/abi.html#vtable
>
> for a complete spec (the document was written for ia64, but ia32 is the
> same other than the size of the pointers).
>
>
>


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