This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/29286] [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should
- From: "mark at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 May 2007 20:17:39 -0000
- Subject: [Bug libstdc++/29286] [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should
- References: <bug-29286-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #97 from mark at codesourcery dot com 2007-05-18 21:17 -------
Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement
new does not change the dynamic type as it should
rguenth at gcc dot gnu dot org wrote:
> But construction/initialization of uninitalized memory in <memory> happens with
> placement new! So we're back to square one. What this PR initially was about
> is a fixed type memory allocator in C++ which needs to change memory from
> allocated type T to free-space-managing-structure S at deallocation time and
> the other way around at allocation time. We absolutely _have_ to handle
> this case correct. And we need to optimize the <memory> routines that use
> placement new, because they resemble patterns used in libraries like POOMA
> or Boost.
First and foremeost, we have to generate correct code. If that means
the memory barrier solution, for now, then so be it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286