This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: vtbl layout
- To: adriang at campbellsoft dot com
- Subject: Re: vtbl layout
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Wed, 6 Jan 1999 21:28:41 +0100
- CC: egcs at egcs dot cygnus dot com
- References: <0004C234.1452@campbellsoft.com>
> I did my research and found out the above details. One thing I
> couldn't completely figure out is how is the 'adjustment to the
> front of the complete object' ever used. Can anyone post a code
> fragment whose generated assembler actually uses the first slot of
> the vtable. Or can anyone point me in the right direction so that I
> can come up with the code myself?
Consider
struct A{
int i;
virtual ~A();
};
struct B{
int j;
virtual ~B();
};
struct C: virtual A, virtual B{
virtual ~C();
};
C::~C(){}
on i596-pc-linux-gnu, I get
__vt_1C.1B:
.long -16
.long __tf1C
.long __thunk_16__._1C
Regards,
Martin