This is the mail archive of the gcc-patches@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: [PATCH, PR 45934 4/6] Dynamic type change detection


On 12/01/2010 03:16 PM, Martin Jambor wrote:
and there are no unions of non-POD types

This is actually no longer true in C++0x.


dynamic types.  It assumes that destructors begin with assignment into
all VMT pointers and that constructors essentially look in the
following way:

1) The very first thing they do is that they call constructors of the
    components (including ancestor sub-objects) that have them.

2) Then VMT pointers of this and all its ancestors is set to new
    values corresponding to the type corresponding to the constructor.

Slight clarification: this happens after calling constructors for base sub-objects and before calling constructors for member sub-objects.


The rest of the writeup all sounds correct.

Jason


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