This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Interleaving pthread_cleanups in C and C++
On May 5, 2003, Zack Weinberg <zack@codesourcery.com> wrote:
> Extending an existing nonstandard notation (attribute) can be done
> with much lower risk.
Extending the language in any way is risky. I've just posted a
message in which I show expect to show that attribute cleanup is not
as clean as desirable for a new language extension. I don't think
raising the bar for try/finally and letting this cleanup go in just
because it doesn't require a syntax extension is a reasonable
approach. try/finally has well-known semantics, and fits in far more
nicely than attribute((cleanup)) in a procedural language.
There's too much risk that something else that none of us have though
of will make attribute((cleanup)) one of those features we'll regret
having introduced. try/finally, OTOH, has already been experimented
with in several other C compilers, and is a feature of Java, which
makes it far more suitable for adoption without a lot of thought.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer