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: "gdr at cs dot tamu dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 May 2007 13:26:15 -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 #83 from gdr at cs dot tamu dot edu 2007-05-18 14:26 -------
Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the
dynamic type as it should
"ian at airs dot com" <gcc-bugzilla@gcc.gnu.org> writes:
| The test case in comment #71 doesn't use placement new either.
|
| This PR was originally about placement new.
Yes.
| I think there is general agreement
| thta placement new needs to avoid aliasing problem.
Yes.
The intent of placement new is to specify a new dynamic type, and end
the lifetime of previous object. This is type safe, beause the "old"
object no longer exists.
| I don't think there is
| general agreement that arbitrary type casting needs to avoid aliasing
problems.
agree.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286