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: [C++ PATCH] Fix placement new if operator new has 2nd argument REFERENCE_TYPE (PR c++/34862)


On Feb 5, 2008 7:06 PM, Jason Merrill <jason@redhat.com> wrote:
> Richard Guenther wrote:
> > The problem arises at the point of inlining, where the optimizers need to see
> > that at the _beginning_ of the inlined new operator the dynamic type
> > of the storage is changing.
>
> Why?  The new operator isn't doing anything to the storage.

In PR33407 an implementation of ::new (called by new expression) might
choose to zero-initialize storage for example.  But you are probably right,
as the new type is in effect only at the point the new object is constructed
which happens by a constructor called on the result pointer.

Richard.


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