This is the mail archive of the gcc-help@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: Question about duplicate C++ functions generated with GNU 3.4.1


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


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