This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
vtable question
- To: gcc at gcc dot gnu dot org
- Subject: vtable question
- From: Thomas Kuhn <t_kuhn at gmx dot de>
- Date: Sat, 20 Oct 2001 02:09:06 +0200
Hi
When I examine the parse tree for a call expression I get something like
obj+16 when calling a virtual member function from the object obj.
I need to know which function is hidden behind that expression. Is it save
to assume that the 16 is calculated with sizeof(void *) * DECL_VINDEX(node)
when node is the FUNCION_DECL for the function that is called ? (I only need
to check c++ files so other front ends that use vtables too are not required
to work like that). Or is there a macro that I have overseen ?
Then I could simply check all classmembers for a matching DECL_VINDEX.
Thanks in advance for reading !
Regards -
Thomas