This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH for DR 1338 (operator new aliasing)
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Jason Merrill <jason at redhat dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 14 Apr 2014 11:58:45 +0200
- Subject: Re: C++ PATCH for DR 1338 (operator new aliasing)
- Authentication-results: sourceware.org; auth=none
- References: <534831D5 dot 7000207 at redhat dot com> <20140414064649 dot GF6581 at atrey dot karlin dot mff dot cuni dot cz>
On Mon, Apr 14, 2014 at 8:46 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> At the last C++ meeting I got the committee to accept wording that
>> ought to allow us to set DECL_IS_MALLOC on the built-in operator
>> new:
>>
>> Furthermore, for the library allocation functions in 18.6.1.1
>> [new.delete.single] and 18.6.1.2 [new.delete.array], p0 shall point
>> to a block of storage disjoint from the storage for any other object
>> accessible to the caller.
>
> Amazing, thanks a lot!
That leaves out the possibility of implementations initializing the
new memory (basically it's an issue when objects already reachable
to the caller are now reachable indirectly through the newly allocated
and initialized memory).
Richard.
> Honza