stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r350043 - /incubator/stdcxx/trunk/src/exception.cpp
Date Wed, 30 Nov 2005 20:40:02 GMT
Author: sebor
Date: Wed Nov 30 12:39:58 2005
New Revision: 350043

URL: http://svn.apache.org/viewcvs?rev=350043&view=rev
Log:
2005-11-30  Martin Sebor  <sebor@roguewave.com>

	STDCXX-76
	* exception.cpp: (uncaught_exception): With MSVC 7 and better, used
	__uncaught_exception() to implement std::uncaught_exception() instead
	of relying on the global symbol.

Modified:
    incubator/stdcxx/trunk/src/exception.cpp

Modified: incubator/stdcxx/trunk/src/exception.cpp
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/src/exception.cpp?rev=350043&r1=350042&r2=350043&view=diff
==============================================================================
--- incubator/stdcxx/trunk/src/exception.cpp (original)
+++ incubator/stdcxx/trunk/src/exception.cpp Wed Nov 30 12:39:58 2005
@@ -1,8 +1,8 @@
  /***************************************************************************
  *
- * stdexcept.cpp - Source for the Standard Library exception classes
+ * exception.cpp - sources of the C++ Standard Library exception classes
  *
- * $Id: //stdlib/dev/source/stdlib/exception.cpp#5 $
+ * $Id$
  *
  ***************************************************************************
  *
@@ -99,7 +99,21 @@
 
 void unexpected ()  _RWSTD_GNUC_ATTRIBUTE ((__noreturn__));
 
-bool uncaught_exception () _THROWS (());
+#if 1300 <= _MSC_VER
+   // MSVC 7 and 8 reliably define __uncaught_exception
+   // uncaught_exception() only seems to be defined by some compiler
+   // magic that requires the compiler's native C++ Standard library
+   // headers
+#  undef _RWSTD_NO_GLOBAL_UNCAUGHT_EXCEPTION
+#  define UNCAUGHT_EXCEPTION   __uncaught_exception
+#endif   // MSVC >= 7.0
+
+#ifndef UNCAUGHT_EXCEPTION
+#  define UNCAUGHT_EXCEPTION   uncaught_exception
+#endif   // UNCAUGHT_EXCEPTION
+
+_RWSTD_DLLIMPORT bool UNCAUGHT_EXCEPTION () _THROWS (());
+
 
 _RWSTD_NAMESPACE (std) { 
 
@@ -216,7 +230,7 @@
 {
 #    ifndef _RWSTD_NO_GLOBAL_UNCAUGHT_EXCEPTION
 
-    return ::uncaught_exception ();
+    return ::UNCAUGHT_EXCEPTION ();
 
 #    else   // if defined (_RWSTD_NO_GLOBAL_UNCAUGHT_EXCEPTION)
 



Mime
View raw message