This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7004: The program aborts if a function with exception-specification throws an exception that is not listed
- From: lerdsuwa at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, vzw00011 at nifty dot ne dot jp
- Date: 14 Jun 2002 16:51:07 -0000
- Subject: Re: c++/7004: The program aborts if a function with exception-specification throws an exception that is not listed
- Reply-to: lerdsuwa at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, vzw00011 at nifty dot ne dot jp, gcc-gnats at gcc dot gnu dot org
Synopsis: The program aborts if a function with exception-specification throws an exception that is not listed
State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Fri Jun 14 09:51:07 2002
State-Changed-Why:
Not a bug. According to the standard (section 15.5.2,
18.6.2, 18.6.3) when a thrown exception doesn't match those
mentioned in the exception specification, it calls
unexpected(). The default behavior of unexpected()
is calling terminate() which in turn aborts the program.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7004