This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13944] [3.3/3.4/3.5 Regression] exception in constructor of a class to be thrown is not caught
- From: "jason at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Feb 2004 18:27:08 -0000
- Subject: [Bug c++/13944] [3.3/3.4/3.5 Regression] exception in constructor of a class to be thrown is not caught
- References: <20040131120212.13944.debian-gcc@lists.debian.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jason at redhat dot com 2004-02-16 18:27 -------
Subject: Re: [3.3/3.4/3.5] exception in constructor of a
class to be thrown is not caught
Actually, this testcase does terminate under EDG:
struct A
{
A() { }
A(const A&) { throw 1; }
};
int main()
{
A a;
try
{
throw a;
}
catch(...)
{
}
}
To match this behavior, we need to treat cases where we elide the copy
constructor differently, as discussed in my comment in build_throw.
Jason
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13944