This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16897] a rethrow outside of a catch isn't flagged
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Aug 2004 15:35:32 -0000
- Subject: [Bug c++/16897] a rethrow outside of a catch isn't flagged
- References: <20040806113438.16897.brendan@zen.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2004-08-06 15:35 -------
Subject: Re: a rethrow outside of a catch isn't flagged
"brendan at zen dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Subject: Re: a rethrow outside of a catch isn't flagged
|
| On Friday 06 August 2004 15:22, bangerth at dealii dot org wrote:
| > Joerg's explanation is correct. 15.1/6 and /7 don't specify that
| > "throw;" has to be lexically inside a catch block. In particular,
| > 15.1/8 says that if there is no exception presently being handled,
| > then the program aborts by calling terminate().
|
| Agreed. However, I think by far the majority of people using rethrow aren't
| intending to do it outside of a handler. Thus I believe a warning would be
| helpful to people accidentally doing
Last time we went down this road -- transforming personal mistakes
into to universals -- we get a nearly-useless -Weffc++.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16897