On Fri, Jun 01, 2007 at 06:28:52PM +0200, Marcus Meissner wrote: > Hi, > > addition of alloc_size attribute to the changes.html. > > Ciao, Marcus
Less plugging of examples as suggested by Dirk... Index: htdocs/gcc-4.3/changes.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.3/changes.html,v retrieving revision 1.57 diff -u -r1.57 changes.html --- htdocs/gcc-4.3/changes.html 25 May 2007 17:20:59 -0000 1.57 +++ htdocs/gcc-4.3/changes.html 1 Jun 2007 16:59:02 -0000 @@ -199,6 +199,16 @@ the diverse warnings enabled by <code>-Wextra</code>. </li> + <li> + A new function attribute <code>alloc_size</code> has been added to + mark up <code>malloc</code> style functions. For constant sized + allocations this can be used to find out the size of the returned + pointer using the <code>__builtin_object_size()</code> function + for buffer overflow checking and similar. + This supplements the already built-in <code>malloc</code> and + <code>calloc</code> constant size handling. + </li> + </ul> <h3>C++</h3>