summary refs log tree commit diff
path: root/stdlib/stdlib.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-07-19 17:05:14 +0000
committerUlrich Drepper <drepper@redhat.com>2007-07-19 17:05:14 +0000
commit1c3e748ef3e76af3f8c12ac614e1bfac0ae46ea8 (patch)
tree1fb8f87c0a2ea8278f07bad4a81afd22790bb5a2 /stdlib/stdlib.h
parent4e425301f4a6264c73eddf31b82c2d197a1a8b16 (diff)
downloadglibc-1c3e748ef3e76af3f8c12ac614e1bfac0ae46ea8.tar.gz
glibc-1c3e748ef3e76af3f8c12ac614e1bfac0ae46ea8.tar.xz
glibc-1c3e748ef3e76af3f8c12ac614e1bfac0ae46ea8.zip
[BZ #4792]
	* stdlib/stdlib.h (realloc): Remove __attribute_malloc__.
	* malloc/malloc.h (realloc): Likewise.

2007-07-16  Jakub Jelinek  <jakub@redhat.com>
Diffstat (limited to 'stdlib/stdlib.h')
-rw-r--r--stdlib/stdlib.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index aa5f514caa..dd78744539 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -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