extend.texi (malloc attribute): Adjust according to implementation.
authorRichard Guenther <rguenther@suse.de>
Wed, 11 Jan 2012 09:01:36 +0000 (09:01 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 11 Jan 2012 09:01:36 +0000 (09:01 +0000)
2012-01-11  Richard Guenther  <rguenther@suse.de>

* doc/extend.texi (malloc attribute): Adjust according to
implementation.

From-SVN: r183092

gcc/ChangeLog
gcc/doc/extend.texi

index 91e2a65e469d6ba93dbe1c6ad7e407bb07329beb..b685805abeb903e7137566538c80505819b0b337 100644 (file)
@@ -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>
 
index 53bfd1cfac47599573e517c3d0f8f6455e5a5859..18ff7462bd72fd848c184c0378a1045ec9cf07d5 100644 (file)
@@ -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