OSDN Git Service

PR libstdc++/14026
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / libsupc++ / eh_catch.cc
index f8b7137..0e18660 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*- Exception handling routines for catching.
-// Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
 //
 // This file is part of GCC.
 //
@@ -65,10 +65,12 @@ __cxa_begin_catch (void *exc_obj_in)
     // This exception was rethrown from an immediately enclosing region.
     count = -count + 1;
   else
-    count += 1;
+    {
+      count += 1;
+      globals->uncaughtExceptions -= 1;
+    }
   header->handlerCount = count;
 
-  globals->uncaughtExceptions -= 1;
   if (header != prev)
     {
       header->nextException = prev;