This is the mail archive of the
mailing list for the GCC project.
Re: PATCH RFC: Implement and use VEC(T,stack)
Alexandre Oliva <email@example.com> writes:
> I wonder if it would make sense to introduce an attribute with a cleanup
> that could be used to verify or even automate (GCC-only) the release of
> the vector in case it gets reallocated. Considering that it is supposed
> to most often not be reallocated into the heap, this would probably work
> well even in stage1, when the attribute may be unavailable. This would
> help catch (at run time) mistakes such as returning the alloca()ed
We do already have the cleanup attribute for types. I'm agnostic as
to whether we want to start using it in the gcc sources.