Re: [PATCH] __attribute_malloc__ for malloc-like functions
| From: | Sascha Schumann | Date: | Thu, 28 Aug 2003 11:39:49 +0000 |
| Subject: | Re: [PATCH] __attribute_malloc__ for malloc-like functions | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-4221@lists.php.net to get a copy of this message | ||
On Thu, 28 Aug 2003, Ard Biesheuvel wrote:
> > attribute((malloc)) is now enabled in CVS. Note that
> > erealloc was excluded.
>
> I used __attribute_malloc__ intentionally, because it is also supported
> by GCC 2.
Nope, it does not.
$ cat m.c
void *p(void) __attribute_malloc__;
$ gcc -c m.c
m.c:1: parse error before `__attribute_malloc__'
m.c:1: warning: data definition has no type or storage class
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs
gcc version 2.95.3 20010315 (release)
The same happens with the latest RedHat GCC 2.96-113.
- Sascha