Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
jeffhurst
PostPosted: Sep 25, 2003 - 05:27 AM
Newbie


Joined: Mar 27, 2002
Posts: 0


To demangle
c++filt _ZN8SoftUARTC2Eh
SoftUART::SoftUART[not-in-charge](unsigned char)
xc++filt _ZN8SoftUARTC1Eh
SoftUART::SoftUART[in-charge](unsigned char)

Re: C++ ABI: cloning of constructors/destructors

* To: dspezia at amadeus dot net
* Subject: Re: C++ ABI: cloning of constructors/destructors
* From: Nathan Sidwell
* Date: Mon, 09 Jul 2001 20:52:17 +0100
* CC: gcc at gcc dot gnu dot org
* Organization: Codesourcery LLC
* References:

dspezia@amadeus.net wrote:
>
> Hi all,
>
> I've just installed GCC 3.0 on a i386 linux box.
>
> Having a look at the code generated from a dummy C++
> program, it seems constructors and destructors are
> generated twice even for the simplest classes.
>
> I'm just curious: what is the purpose of this cloning process ?
See http://gcc.gnu.org/bugs.html#known, from which I quote

G++ emits two copies of constructors and destructors.

In general there are three types of constructors (and destructors).
1.The complete object constructor/destructor.
2.The base object constructor/destructor.
3.The allocating destructor/deallocating destructor.
The first two are different, when virtual base classes are involved. In some cases we can do better, and this is logged in GNATS.


nathan

--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org

And from: http://www.codesourcery.com/cxx-abi/cxx-open.html

Two versions, and two entrypoints, of the constructor will be created: one that calls the virtual base subobject constructor (in-charge), and one that does not.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits