This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Placement new[] weirdness
- To: Jason Merrill <jason at cygnus dot com>
- Subject: Re: Placement new[] weirdness
- From: Andrey Slepuhin <pooh at msu dot ru>
- Date: Sat, 17 Jul 1999 12:04:09 +0400 (MEDT)
- Cc: egcs at egcs dot cygnus dot com, branko dot cibej at hermes dot si, (Mike Stump) <mrs at wrs dot com>, Joe Buck <jbuck at Synopsys dot COM>
- Organization: Moscow State University Network (MSUnet)
On 17-Jul-99 Jason Merrill wrote:
> Yes, this situation sucks. But it's not a bug; the void* placement array
> new as defined in the standard is inherently useless. You might file a
> defect report.
>
> As you (Andrey) noted, egcs doesn't allocate space for the cookie if the
> object type doesn't have a destructor; that was me trying to make it more
> useful. Perhaps I should have disabled the cookie for all cases of the
> standard placement new, since there's no well-formed delete-expression you
> can use to delete the result of such a new.
Hi,
My apologies to all for this discussion. I really didn't want to make
this thread growing to such huge size.
Indeed I was confused a lot because in final C++ draft I have important
words about "the result of the new-expression will be offset by this amount
from the value returned by operator new[]" were absent. Branko, thanks to
point this out. And many thanks to Mike for his patience, because I
often explained bad what I really thought.
Once more, my apologies.
Best regards,
Andrey.