Patch: malloc function attribute

Anthony Green green@cygnus.com
Tue Nov 30 23:59:00 GMT 1999


Jeff wrote:
> I don't remember getting a conclusive answer on that issue.  Also note
> that attributes are probably more likely to work in a language like Java
> than __restrict.  

FWIW, this is a non-issue for Java, where attributes aren't available
to programmers.  They're only used in the parts of the runtime that
are written in C++ and C, like...

/* Allocate space that is known to be pointer-free.  */
void *_Jv_AllocBytes (jsize size) __attribute__((__malloc__));

There are about a dozen routines like this.  If there were some better
way of achieving the same result in C/C++ then that would be fine.

AG

-- 
Anthony Green                                               Cygnus Solutions
                                                       Sunnyvale, California



More information about the Gcc-patches mailing list