This is the mail archive of the
mailing list for the libstdc++ project.
Re: Consistently using __throw_* (was: Re: PATCH: Eliminate uses of "sleep"...)
- From: Jonathan Wakely <cow at compsoc dot man dot ac dot uk>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: Mark Mitchell <mark at codesourcery dot com>,libstdc++ <libstdc++ at gcc dot gnu dot org>,Benjamin Kosnik <bkoz at redhat dot com>
- Date: Wed, 5 Jan 2005 15:37:00 +0000
- Subject: Re: Consistently using __throw_* (was: Re: PATCH: Eliminate uses of "sleep"...)
- References: <41DBFF39.email@example.com>
On Wed, Jan 05, 2005 at 03:52:41PM +0100, Paolo Carlini wrote:
> >"__throw_exception_again;" should be used in place of "throw;" to rethrow
> >an active exception. With -fno-exceptions __throw_exception_again is
> >replaced with an empty string, which is not what's wanted.
> You are right, in my opinion, but let's not involve our release manager
> with our (v3) bugs... ;)
Yes, sorry, Mark - I didn't mean to hold up your patches with my picky
> I mean, some time ago I did an audit for this issue, and for a consistent
> fix we need to add a few functions to the set in functexcept.h.
> At least:
> __throw (which boils down to either throw or abort)
If that is to be used in place of "throw;" then isn't that what
__throw_exception_again() is intended for? It doesn't abort() but does
it need to? Is it not enough to just let a "throw;" statement compile
with -fno-exceptions ?
If -fno-exceptions was given then we will already have aborted when the
original __throw_xxx function was run, unless the exception we've caught
was thrown by user code.
There will also need to be a std::tr1::__throw_bad_weak_ptr() for TR1.
I've currently defined that in <tr1/memory> to avoid adding a new
> and consistently use some already present, like
> If we agree, I can prepare a patch. Benjamin?
> Thanks for your observation,
VOTE, v. The instrument and symbol of a free man's power to make
a fool of himself and a wreck of his country.
- Ambrose Bierce, 'The Devil's Dictionary'