This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: typedef char *temp __attribute__ ((cleanup(free));


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


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