This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: malloc function attribute



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]