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: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 May 2007 11:08:00 -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 #44 from pcarlini at suse dot de 2007-05-04 12:07 -------
(In reply to comment #43)
> (By the way, someone should tell the tramp3d developers that using placement
> new for a POD type like double isn't a very smart idea ;) The only tricky point
> for default inizialization is whether using memset or a plain loop)
Forgot to add a detail that may be of interest, however: C++03 *fails* to
classify as POD some very common and simple types which are morally PODs:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2172.html
Thus let's not assume users to be too good here: sometimes, in generic code,
they may end-up calling placement new also for very simple types.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286