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: "joerg dot richter at pdv-fs dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Aug 2004 13:36:01 -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 joerg dot richter at pdv-fs dot de 2004-08-06 13:35 -------
I think in the general case GCC can't know if the throw is inside a catch or
not.
void func_a()
{
throw;
}
void func_b()
{
try
{
throw 5;
}
catch( ... )
{
func_a();
}
}
Both functions can be in different translation units.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16897