From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32523 invoked by alias); 16 Jul 2007 11:15:17 -0000 Received: (qmail 32507 invoked by uid 22791); 16 Jul 2007 11:15:17 -0000 X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 16 Jul 2007 11:15:15 +0000 Received: from sunsite.mff.cuni.cz (localhost.localdomain [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.8/8.13.8) with ESMTP id l6GBHYcN029802; Mon, 16 Jul 2007 13:17:34 +0200 Received: (from jakub@localhost) by sunsite.mff.cuni.cz (8.13.8/8.13.8/Submit) id l6GBHYUh029801; Mon, 16 Jul 2007 13:17:34 +0200 Date: Mon, 16 Jul 2007 11:15:00 -0000 From: Jakub Jelinek To: Wolfram Gloger Cc: libc-hacker@sources.redhat.com Subject: Re: [PATCH] Fix realloc prototype (BZ #4792) Message-ID: <20070716111733.GQ4603@sunsite.mff.cuni.cz> Reply-To: Jakub Jelinek References: <20070716100214.GP4603@sunsite.mff.cuni.cz> <20070716102947.24376.qmail@md.dent.med.uni-muenchen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070716102947.24376.qmail@md.dent.med.uni-muenchen.de> User-Agent: Mutt/1.4.2.2i Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2007-07/txt/msg00020.txt.bz2 On Mon, Jul 16, 2007 at 10:29:47AM -0000, Wolfram Gloger wrote: > > 2007-07-16 Jakub Jelinek > > > > [BZ #4792] > > * stdlib/stdlib.h (realloc): Remove __attribute_malloc__. > > * malloc/malloc.h (realloc): Likewise. > > Based on the argument above, I disagree with this change. Except that this is highly controversial in GCC apparently, various GCC developers have different opinions on this and that also exhibits in the optimizations GCC will do with malloc attribute. > Within gcc, I guess you are referring to: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32748 I'm not actually refering to that, but e.g. to the "add alloc_size attribute" gcc-patches thread back this May, or to the longish 2004 thread. If GCC has realloc attribute, then glibc should use it, until then it is certainly safer not to use malloc attribute. Jakub