This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9982: placement new returns wrong value
- From: bangerth at dealii dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, kunert at physik dot tu-dresden dot de, nobody at gcc dot gnu dot org
- Date: 6 Mar 2003 19:41:07 -0000
- Subject: Re: c++/9982: placement new returns wrong value
- Reply-to: bangerth at dealii dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, kunert at physik dot tu-dresden dot de, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: placement new returns wrong value
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Thu Mar 6 19:41:07 2003
State-Changed-Why:
This is not a bug. For array expressions, the compiler puts
the number of array elements into the first slot (pointed to
by the placement argument), and only then the elements of the
array. This is so because delete[] needs this information.
This behavior seems allowed by reading 5.3.4, clauses 6, 11
and 12.
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9982