This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Question about duplicate C++ functions generated with GNU 3.4.1
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: "Ramadass, Ramanathan" <Ramanathan dot Ramadass at spirentcom dot com>
- Cc: Jon Watson <j-watson at airvananet dot com>, gcc-help at gcc dot gnu dot org
- Date: Wed, 24 Nov 2004 14:55:31 +0000
- Subject: Re: Question about duplicate C++ functions generated with GNU 3.4.1
- Organization: Codesourcery LLC
- References: <9E9C7F94BFE2AA469B2D3B9C7AC36358041E39@bighorn.adtech-inc.com>
Ramadass, Ramanathan wrote:
It is to do with ctors-for-most-derived and ctors-for-base.
Could you please elaborate on this? I too have been trying to understand
why two copies of ctors are getting created but could never find any
explanation. As you suggested, i browsed through the ABI but still
haven't found anything(so far). From your remark;
http://www.codesourcery.com/cxx-abi/abi.html#vtable-ctor
and http://www.codesourcery.com/cxx-abi/abi.html#obj-ctor
talks about it, but probably not in the most enlightening terms.
Can i infer that it has to do with the initialization of the pointer to
the virtual base class in a derived object? Somewhere in lippman's
"Inside the C++ object model" i had read that the ctor inits this
pointer. Not sure that it is related. Would appreciate it if you(or
somebody else) could throw some light on this.
that presumes a particular ABI implementation, which is now incorrect for
g++ However the basic idea is the same.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk