aboutsummaryrefslogtreecommitdiff
path: root/malloc
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 /malloc
parent4e425301f4a6264c73eddf31b82c2d197a1a8b16 (diff)
downloadglibc-1c3e748ef3e76af3f8c12ac614e1bfac0ae46ea8.zip
glibc-1c3e748ef3e76af3f8c12ac614e1bfac0ae46ea8.tar.gz
glibc-1c3e748ef3e76af3f8c12ac614e1bfac0ae46ea8.tar.bz2
[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 'malloc')
-rw-r--r--malloc/malloc.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/malloc/malloc.h b/malloc/malloc.h
index 1340aa1..b6d7a8a 100644
--- a/malloc/malloc.h
+++ b/malloc/malloc.h
@@ -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));