stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r569492 - /incubator/stdcxx/trunk/tests/support/18.exception.cpp
Date Fri, 24 Aug 2007 19:42:20 GMT
Author: sebor
Date: Fri Aug 24 12:42:19 2007
New Revision: 569492

URL: http://svn.apache.org/viewvc?rev=569492&view=rev
Log:
2007-08-24  Martin Sebor  <sebor@roguewave.com>

	STDCXX-475
	* 18.exception.cpp (induce_exception): Moved local classes
	to namespace scope to work around an Intel C++ 10.0 ICE on
	Linux.

Modified:
    incubator/stdcxx/trunk/tests/support/18.exception.cpp

Modified: incubator/stdcxx/trunk/tests/support/18.exception.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/support/18.exception.cpp?rev=569492&r1=569491&r2=569492&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/support/18.exception.cpp (original)
+++ incubator/stdcxx/trunk/tests/support/18.exception.cpp Fri Aug 24 12:42:19 2007
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2001-2006 Rogue Wave Software.
+ * Copyright 2001-2007 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -727,6 +727,15 @@
     E_bad_alloc, E_bad_cast, E_bad_exception, E_bad_typeid, E_error
 };
 
+
+// helper classes used by the bad_cast test
+// defined at namespace scope rather than at local scope
+// to work around an Intel C++ 10.0 ICE (see STDCXX-475)
+struct Base { virtual ~Base () { } };
+struct Derived1: Base { };
+struct Derived2: Base { };
+
+
 // induce the language runtime into throwing an exception
 // returns e if exception cannot bee thrown
 static RuntimeExceptionId
@@ -801,14 +810,11 @@
 
 #ifndef _RWSTD_NO_DYNAMIC_CAST
 
-        struct A { virtual ~A () { } };
-        struct B: A { } b;
-        struct C: A { };
-
-        A &a = b;
+        Derived1 b;
+        Base &a = b;
 
         // induce bad_cast
-        dynamic_cast<C&>(a);
+        dynamic_cast<Derived2&>(a);
 
         return E_error;
 



Mime
View raw message