[Bug c++/37070] bogus unreachable warning on throw statement

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Aug 9 22:32:00 GMT 2008



------- 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



More information about the Gcc-bugs mailing list