public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/7991: Exception in destructor gets caught twice
@ 2002-09-20 13:16 nospam
0 siblings, 0 replies; 2+ messages in thread
From: nospam @ 2002-09-20 13:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 7991
>Category: c++
>Synopsis: Exception in destructor gets caught twice
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 20 13:16:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Ryan Mack
>Release: gcc-3.2
>Organization:
>Environment:
RH 7.3, cygwin
>Description:
It seems that even though the exception is caught in the destructor, it gets caught again when exiting the catch block.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="foo.cpp"
Content-Disposition: inline; filename="foo.cpp"
#include <iostream>
struct A {
~A()
{
throw 1;
}
};
struct B {
A a;
~B()
try {
} catch (int i) {
std::cerr << "caught exception in ~B: " << i << std::endl;
}
};
int main(int argc, char** argv)
{
try {
B b;
} catch (int i) {
std::cerr << "caught exception in main: " << i << std::endl;
}
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c++/7991: Exception in destructor gets caught twice
@ 2002-09-30 10:07 nathan
0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2002-09-30 10:07 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, nospam
Synopsis: Exception in destructor gets caught twice
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Mon Sep 30 10:07:00 2002
State-Changed-Why:
not a bug [15.3]/16
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7991
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-09-30 17:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-20 13:16 c++/7991: Exception in destructor gets caught twice nospam
2002-09-30 10:07 nathan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).