c++/9982: placement new returns wrong value

bangerth@dealii.org bangerth@dealii.org
Thu Mar 6 20:10:00 GMT 2003


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



More information about the Gcc-bugs mailing list