aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-01-11 09:01:36 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-01-11 09:01:36 +0000
commit65d5c485861aebde7d78e1ab60803a8283491d08 (patch)
treee26e7c1c5edb15a2312cb7c939787e539b2a8985
parent87633176610f86df377de7362ebb081394815733 (diff)
downloadgcc-65d5c485861aebde7d78e1ab60803a8283491d08.zip
gcc-65d5c485861aebde7d78e1ab60803a8283491d08.tar.gz
gcc-65d5c485861aebde7d78e1ab60803a8283491d08.tar.bz2
extend.texi (malloc attribute): Adjust according to implementation.
2012-01-11 Richard Guenther <rguenther@suse.de> * doc/extend.texi (malloc attribute): Adjust according to implementation. From-SVN: r183092
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/doc/extend.texi9
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 91e2a65..b685805 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-11 Richard Guenther <rguenther@suse.de>
+
+ * doc/extend.texi (malloc attribute): Adjust according to
+ implementation.
+
2012-01-10 Aldy Hernandez <aldyh@redhat.com>
Patrick Marlier <patrick.marlier@gmail.com>
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 53bfd1c..18ff746 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -2771,13 +2771,12 @@ efficient @code{jal} instruction.
@cindex @code{malloc} attribute
The @code{malloc} attribute is used to tell the compiler that a function
may be treated as if any non-@code{NULL} pointer it returns cannot
-alias any other pointer valid when the function returns.
+alias any other pointer valid when the function returns and that the memory
+has undefined content.
This will often improve optimization.
Standard functions with this property include @code{malloc} and
-@code{calloc}. @code{realloc}-like functions have this property as
-long as the old pointer is never referred to (including comparing it
-to the new pointer) after the function returns a non-@code{NULL}
-value.
+@code{calloc}. @code{realloc}-like functions do not have this
+property as the memory pointed to does not have undefined content.
@item mips16/nomips16
@cindex @code{mips16} attribute