typedef char *temp __attribute__ ((cleanup(free));
Eljay Love-Jensen
eljay@adobe.com
Tue Jul 27 00:14:00 GMT 2004
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
More information about the Gcc-help
mailing list