Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4234 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69853 invoked by uid 1010); 28 Aug 2003 16:02:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 69809 invoked by uid 1007); 28 Aug 2003 16:02:19 -0000 To: internals@lists.php.net, Sascha Schumann Message-ID: <3F4E278A.8060509@php.net> Date: Thu, 28 Aug 2003 18:02:18 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030723 Thunderbird/0.1 X-Accept-Language: en-us, en MIME-Version: 1.0 References: <20030827204254.35421.qmail@pb1.pair.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 213.84.66.165 Subject: Re: [PHP-DEV] [PATCH] __attribute_malloc__ for malloc-like functions From: abies@php.net (Ard Biesheuvel) >>account that every pointer in scope might be an alias of the resulting >>value. __attribute_malloc__ fixes that. (Disabled for non-GCC compilers) > > > What about erealloc? It can return the same pointer as > passed to it. GNU C realloc() does have the __attribute__((malloc)) itself. This seems reasonable, because, from a strict-aliasing point of view, the result of the function is either a new 'fresh' pointer, or equal to the first argument passed to realloc(), to which the strict-aliasing rules apply already. Ard