]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite_api.h (diamond_derivation<>::test): Expect ambiguity together with the...
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 5 Aug 2008 20:39:48 +0000 (20:39 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 5 Aug 2008 20:39:48 +0000 (20:39 +0000)
2008-08-05  Paolo Carlini  <paolo.carlini@oracle.com>

* testsuite/util/testsuite_api.h (diamond_derivation<>::test):
Expect ambiguity together with the standard exception classes.
* testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc: Remove
xfail.
* testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc:
Likewise.
* testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc:
Likewise.
* testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc:
Likewise.
* testsuite/18_support/bad_alloc/cons_virtual_derivation.cc: Likewise.
* testsuite/18_support/bad_cast/cons_virtual_derivation.cc: Likewise.
* testsuite/18_support/bad_exception/cons_virtual_derivation.cc:
Likewise.
* testsuite/18_support/bad_typeid/cons_virtual_derivation.cc:
Likewise.
* testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc:
Likewise.
* testsuite/ext/forced_exception_error/cons_virtual_derivation.cc:
Likewise.
* testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc:
Likewise.
* testsuite/20_util/bad_function_call/cons_virtual_derivation.cc:
Likewise.

From-SVN: r138737

14 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/18_support/bad_alloc/cons_virtual_derivation.cc
libstdc++-v3/testsuite/18_support/bad_cast/cons_virtual_derivation.cc
libstdc++-v3/testsuite/18_support/bad_exception/cons_virtual_derivation.cc
libstdc++-v3/testsuite/18_support/bad_typeid/cons_virtual_derivation.cc
libstdc++-v3/testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc
libstdc++-v3/testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc
libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc
libstdc++-v3/testsuite/20_util/bad_function_call/cons_virtual_derivation.cc
libstdc++-v3/testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc
libstdc++-v3/testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc
libstdc++-v3/testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc
libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc
libstdc++-v3/testsuite/util/testsuite_api.h

index 9e8a6e6700f5f51e9b0ef1ddd1c1400c0bdb3e89..704ae7c810c3fbe3a196e6b462c2462f61a502a3 100644 (file)
@@ -1,3 +1,30 @@
+2008-08-05  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * testsuite/util/testsuite_api.h (diamond_derivation<>::test):
+       Expect ambiguity together with the standard exception classes.
+       * testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc: Remove
+       xfail.
+       * testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc:
+       Likewise.
+       * testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc:
+       Likewise.
+       * testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc:
+       Likewise.
+       * testsuite/18_support/bad_alloc/cons_virtual_derivation.cc: Likewise.
+       * testsuite/18_support/bad_cast/cons_virtual_derivation.cc: Likewise.
+       * testsuite/18_support/bad_exception/cons_virtual_derivation.cc:
+       Likewise.
+       * testsuite/18_support/bad_typeid/cons_virtual_derivation.cc:
+       Likewise.
+       * testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc:
+       Likewise.
+       * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc:
+       Likewise.
+       * testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc:
+       Likewise.
+       * testsuite/20_util/bad_function_call/cons_virtual_derivation.cc:
+       Likewise.
+
 2008-08-04  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/bits/postypes.h: Reinstate inclusion of <stdint.h>;
index dd0d09b6fb44f5659adea0b62ed72554e7665b6a..b7d28cc34d8710def6786b6f3ef8005e2ff7d1a6 100644 (file)
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
 // 2007-05-29 Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
index 4efc3466cf943d3c57ab43615f74fb42088b96d6..358f0c5dfd6d208025d17ca2dbb73f7f13005c9a 100644 (file)
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
 // 2007-05-29 Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
index b66ce7d43edd4a6f05e0440e6c5c8ace19a51f86..8fb71fe6399b80c3074c2fbc365519b766f2093e 100644 (file)
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
 // 2007-05-29 Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
index 0da3c9deac8f5a2c0e7f0ab3babdfe7f211fa553..9d69eb3fd25aa138cf04ca70ca8e8b96d1b0b95d 100644 (file)
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
 // 2007-05-29 Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
index 5c936e27f16e98090a23e187e5e5fd63a794d489..350f66d9499721f03b4d6b0a77109c5ff521db6a 100644 (file)
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
 // 2007-05-29 Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
index 86d5bb5ed717c0a89a5da68591fced90f0a03ec3..c8870e51efb56d71e4db18b4238ea74e5def0fdd 100644 (file)
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
 // 2007-05-29 Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
index 8e67ce5edae1b0807006197b532a0468a674ddaa..098fb575dab29b1b2fe6618aa6ed67eac6583ff5 100644 (file)
@@ -1,8 +1,7 @@
 // { dg-options "-std=gnu++0x" }
-// { dg-do run { xfail *-*-* } }
 // 2007-05-29 Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
index 6cc46c02a517cb27803c092fa227a656452c1504..c31563a3351fe83f4b9dc50e1f6207ae90cd86c8 100644 (file)
@@ -1,8 +1,7 @@
-// { dg-do run { xfail *-*-* } }
 // { dg-options "-std=gnu++0x" }
 // 2007-05-29 Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
index 1819726a37bdc7960d12531970b9950c610b0f81..87bf982407f028a4936cf92fa92ce2460c38028d 100644 (file)
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
 // 2007-05-29 Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
index 07396b0b219d2f0c23288716adda1686382383ed..35602c71272a6ef67706d5b880ecd368649cbc76 100644 (file)
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
 // 2007-05-29 Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
index ddc2c46b8ede41b0974d41aaa861656ded3c7e11..d6e4e8b1b22c886c54525ea7092bad2a29f787bc 100644 (file)
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
 // 2007-05-29 Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
index ae6ef0bd6232e3bf2b56d7559013feffe40bf009..81b5214812f85733d4f78e419b74be3b3289f028 100644 (file)
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
 // 2007-05-29 Benjamin Kosnik  <bkoz@redhat.com>
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
index cbb606c42a857cfecfa66e68d4ce0d7b93394e37..74b25d2d9507b2c0e68b5ca47e6dce2107d5f09a 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 // Exception testing utils for the C++ library testsuite. 
 //
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -47,16 +47,19 @@ namespace __gnu_test
   template<typename Exception>
     struct diamond_derivation_base<Exception, true>
     {
-      struct diamond_derivation_error: bad_non_virtual, Exception
+      struct diamond_derivation_error
+      : bad_non_virtual, Exception
       {
-       diamond_derivation_error() : bad_non_virtual(), Exception() { }
+       diamond_derivation_error()
+        : bad_non_virtual(), Exception() { }
       };
     };
 
   template<typename Exception>
     struct diamond_derivation_base<Exception, false>
     {
-      struct diamond_derivation_error: bad_non_virtual, Exception
+      struct diamond_derivation_error
+      : bad_non_virtual, Exception
       {
        diamond_derivation_error()
        : bad_non_virtual(), Exception("construct diamond") { }
@@ -64,18 +67,25 @@ namespace __gnu_test
     };
   
   template<typename Exception, bool DefaultCons>
-    struct diamond_derivation: diamond_derivation_base<Exception, DefaultCons>
+    struct diamond_derivation
+    : diamond_derivation_base<Exception, DefaultCons>
     {
       typedef diamond_derivation_base<Exception, DefaultCons> base_type;
       typedef typename base_type::diamond_derivation_error error_type;
-      
+
+      // NB: In the libstdc++-v3 testsuite, all the standard exception
+      // classes (+ a couple of extensions) are checked:  since they
+      // all derive *non* virtually from std::exception, the expected
+      // behavior is ambiguity.
       static void test()
       {
        bool test __attribute__((unused)) = true;      
-       try { throw error_type(); }
-       catch (std::exception const& e) { }
-       catch (...) 
+       try
+         { throw error_type(); }
+       catch (std::exception const&)
          { VERIFY( false ); }
+       catch (...) 
+         { VERIFY( true ); }
       }
     };