This is the mail archive of the gcc@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: Interleaving pthread_cleanups in C and C++


> X-Original-To: geoffk@foam.wonderslug.com
> From: Alexandre Oliva <aoliva@redhat.com>
> Organization: GCC Team, Red Hat
> Date: 05 May 2003 21:50:28 -0300
> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
> X-OriginalArrivalTime: 06 May 2003 00:50:47.0514 (UTC) FILETIME=[8843BBA0:01C31369]
> 
> 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.

On the other hand, suppose that try/finally does eventually get
standardized... differently to the way that we implemented it.
Consider 'inline', for example.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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