]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
[BZ #4792]
authorUlrich Drepper <drepper@redhat.com>
Thu, 19 Jul 2007 17:05:14 +0000 (17:05 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 19 Jul 2007 17:05:14 +0000 (17:05 +0000)
* stdlib/stdlib.h (realloc): Remove __attribute_malloc__.
* malloc/malloc.h (realloc): Likewise.

2007-07-16  Jakub Jelinek  <jakub@redhat.com>

ChangeLog
malloc/malloc.h
stdlib/stdlib.h

index 0529d065ea04427e723304c9dba1946864e4148d..c68a43d62e07a6ebfcb701436143e9fe96e487bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-07-16  Jakub Jelinek  <jakub@redhat.com>
+
+       [BZ #4792]
+       * stdlib/stdlib.h (realloc): Remove __attribute_malloc__.
+       * malloc/malloc.h (realloc): Likewise.
+
 2007-07-16  Jakub Jelinek  <jakub@redhat.com>
 
        * libio/iopopen.c (_IO_new_proc_open): Don't close child_std_end
index 1340aa15bcf40e8efbcf738ad618b041d28dee09..b6d7a8afaf9d2af8fa175963b14312202617e2bb 100644 (file)
@@ -1,5 +1,6 @@
 /* Prototypes and definition for malloc implementation.
-   Copyright (C) 1996,97,99,2000,2002-2004,2005 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1999, 2000, 2002-2004, 2005, 2007
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -54,8 +55,11 @@ extern void *calloc __MALLOC_P ((size_t __nmemb, size_t __size))
 
 /* Re-allocate the previously allocated block in __ptr, making the new
    block SIZE bytes long.  */
+/* __attribute_malloc__ is not used, because if realloc returns
+   the same pointer that was passed to it, aliasing needs to be allowed
+   between objects pointed by the old and new pointers.  */
 extern void *realloc __MALLOC_P ((void *__ptr, size_t __size))
-       __attribute_malloc__ __attribute_warn_unused_result__;
+       __attribute_warn_unused_result__;
 
 /* Free a block allocated by `malloc', `realloc' or `calloc'.  */
 extern void free __MALLOC_P ((void *__ptr));
index aa5f514caa6afb11971a14eb042dfad3717596cf..dd7874453927121188d4315c79976d030b2b486c 100644 (file)
@@ -597,8 +597,11 @@ __END_NAMESPACE_STD
 __BEGIN_NAMESPACE_STD
 /* Re-allocate the previously allocated block
    in PTR, making the new block SIZE bytes long.  */
+/* __attribute_malloc__ is not used, because if realloc returns
+   the same pointer that was passed to it, aliasing needs to be allowed
+   between objects pointed by the old and new pointers.  */
 extern void *realloc (void *__ptr, size_t __size)
-     __THROW __attribute_malloc__ __attribute_warn_unused_result__;
+     __THROW __attribute_warn_unused_result__;
 /* Free a block allocated by `malloc', `realloc' or `calloc'.  */
 extern void free (void *__ptr) __THROW;
 __END_NAMESPACE_STD