This is the mail archive of the gcc-patches@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: [RFC] C++ vs forced unwinding


On Wed, 2 Apr 2003 13:25:54 -0800, Mike Stump <mrs at apple dot com> wrote:

>> A catch-all block may be executed during forced unwinding. For instance, a
>> longjmp may execute code in a catch(...) during stack unwinding. However,
>> if this happens, unwinding will proceed at the end of the catch-all block,
>> whether or not there is an explicit rethrow.
>
> Either, this is ambiguous and states that each vendor may choose to run
> catch(...) code during forced unwinding, which, in my estimation, it cannot
> do, as behavior like this must be decided so that the user can know what
> the semantics are, or, it states that the catch (...) code _must_ _always_
> be run.  Only the latter makes any sense.  So, unless you want to rewrite
> the the standard, it must be run.  In any event, the standard should be
> clarified so that it is perfectly clear to both you and I what it means.

Actually, the intent was that it's implementation-defined.  That an
implementation can run catch (...) blocks if it can figure out a way to do
it correctly, but that it isn't required.  I think we shouldn't bother, at
least for now.

Jason


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