This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: malloc function attribute
- To: law at cygnus dot com
- Subject: Re: Patch: malloc function attribute
- From: Anthony Green <green at cygnus dot com>
- Date: Mon, 29 Nov 1999 06:03:46 -0800 (PST)
- CC: ghazi at caip dot rutgers dot edu, gcc-patches at gcc dot gnu dot org
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