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 06:26:49 -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 #80 from mark at codesourcery dot com 2007-05-18 07: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 wrote:
> ------- Comment #78 from ian at airs dot com 2007-05-18 07:14 -------
> The test case in comment #73 is just a standard aliasing violation. You are
> casting a double* to an int* and writing to it both ways.
I'm confused. The double-ness looks irrelevant to me; it could just as
well be "void *". The only actual accesses to the memory are through an
"int *" pointer and a "long *" pointer, and there's a placement new
between the two. I thought the whole point of these patches was to
allow placement new to change the type in exactly this way?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286