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]

vtable question


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


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