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: [3.3] Followup to C++ forced unwinding


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Mitchell wrote:

> You've not explained how falling off the end of a catch handler is
> impossible, but running a destructor that doesn't return, is possible.

I did.  The state of the thread changes.  It's not a normal thread
anymore, it's a terminating thread.  As such it cannot work normally
anymore, it will behave badly or work not all anymore if used outside
the cleanup handlers.  It might hang or bring the entire process down.


> Skipping over a "catch(...)" block is a bad idea.
> 
> Inserting an implicit rethrow is a bad idea.

I don't see how the latter can be bad.  That's what is supposed to
happen anyway.


> A compromise position is to call std::terminate for now.

For all catch blocks or only catch(...)?

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+sHIt2ijCOnn/RHQRArvXAJ9ut8PHga+dbYLVx3i3YBtSX2i4hgCdFG30
piKJKR+3NaE+8v4hPAvLlIM=
=aIiP
-----END PGP SIGNATURE-----


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