public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: vzw00011@nifty.ne.jp To: gcc-gnats@gcc.gnu.org Subject: c++/7004: The program aborts if a function with exception-specification throws an exception that is not listed Date: Wed, 12 Jun 2002 06:16:00 -0000 [thread overview] Message-ID: <20020612130615.31359.qmail@sources.redhat.com> (raw) >Number: 7004 >Category: c++ >Synopsis: The program aborts if a function with exception-specification throws an exception that is not listed >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Wed Jun 12 06:16:03 PDT 2002 >Closed-Date: >Last-Modified: >Originator: vzw00011@nifty.ne.jp >Release: 3.1 >Organization: >Environment: Linux orange.fruits 2.4.19-pre3 #4 Fri Mar 15 21:50:55 JST 2002 i586 unknown >Description: When gcc compiles the code, gcc output no error or warning. but, the program abort. I think that it is safe that gcc complains compile-error or warning. >How-To-Repeat: #include <exception> #include <cstdio> class MyException: public std::exception { }; void g() throw(MyException) { throw MyException(); } void f() throw() { g(); } int main() { try { f(); } catch (MyException& e) { printf("MyException thrown.\n"); } catch (...) { printf("something thrown.\n"); } return 0; } >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-06-12 13:16 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-06-12 6:16 vzw00011 [this message] 2002-06-14 9:56 lerdsuwa
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020612130615.31359.qmail@sources.redhat.com \ --to=vzw00011@nifty.ne.jp \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).