This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Marking C++ new operator as malloc?
On Mon, Sep 10, 2007 at 05:33:24AM +1200, Ross Smith wrote:
> > [...] If the request succeeds, the value returned shall be a nonnull
> > pointer value (4.10) p0 different from any previously returned value
> > p1, unless that value p1 was subsequently passed to an operator delete.
>
> That's not sufficient. First, merely requiring pointers to be different
> isn't the same as requiring them not to alias, which requires the blocks
> of memory they point to not to overlap.
That might be grounds for a defect report; clearly the blocks handed out
must not overlap, or conforming programs will fail.