This is the mail archive of the libc-hacker@sourceware.org mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix realloc prototype (BZ #4792)


On Mon, Jul 16, 2007 at 10:29:47AM -0000, Wolfram Gloger wrote:
> > 2007-07-16  Jakub Jelinek  <jakub@redhat.com>
> > 
> > 	[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]