http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53225

--- Comment #3 from Thomas W. Lynch <dimitrisdad at gmail dot com> 2012-05-04 
05:20:46 UTC ---
> I don't think this is valid as the memory which is done after the operator new
is considered as unitialized.

The code does not use any uninitialized memory.  It does not read the memory. 
However, it accesses the _type_  and the type exists before an instance of that
type is made.  

Part of the type information is the layout inside the class. The operator,
which has been copied into the child via inheritance,  i.e. the child's version
of the operator should be seeing the type of the child, not the type of the
parent.  The parent is irrelevant once its type is constructed - i.e. after the
inheritance operation - which occurs before any instances are instantiated.

-Thomas

Reply via email to