This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: typedef char *temp __attribute__ ((cleanup(free));
- From: Eljay Love-Jensen <eljay at adobe dot com>
- To: Leah <silume at earthlink dot net>, gcc-help at gcc dot gnu dot org
- Date: Mon, 26 Jul 2004 19:14:28 -0500
- Subject: Re: typedef char *temp __attribute__ ((cleanup(free));
- References: <20040726181121.0407bac0.silume@earthlink.net>
Hi Leah,
I believe the cleanup attribute is associated with the variable, not with
the type. And not just any variable, it has to be an auto variable (not a
static variable, not a parameter).
A typedef does not define a variable, it defines a type (or, really, a
synonymous alias to a type).
But that's just my take on it, I may be mistaken.
HTH,
--Eljay