This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37070] bogus unreachable warning on throw statement
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Aug 2008 22:31:20 -0000
- Subject: [Bug c++/37070] bogus unreachable warning on throw statement
- References: <bug-37070-1186@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-08-09 22:31 -------
I don't think this is really bogus as the expression inside a throw cannot
throw so GCC is able to optimize away the catch inside that throw.
[t.cc : 3] try
{
[t.cc : 3] D.2413 = (int *) D.2410;
[t.cc : 3] *D.2413 = 0;
}
catch
{
[t.cc : 3] <<<eh_filter (NULL)>>>
{
[t.cc : 3] terminate ();
}
}
That catch is not reachable.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37070