aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstdc++-v3/ChangeLog27
-rw-r--r--libstdc++-v3/testsuite/18_support/bad_alloc/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/18_support/bad_cast/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/18_support/bad_exception/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/18_support/bad_typeid/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/20_util/bad_function_call/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_api.h28
14 files changed, 58 insertions, 33 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 9e8a6e6..704ae7c 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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>;
diff --git a/libstdc++-v3/testsuite/18_support/bad_alloc/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/18_support/bad_alloc/cons_virtual_derivation.cc
index dd0d09b..b7d28cc 100644
--- a/libstdc++-v3/testsuite/18_support/bad_alloc/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/18_support/bad_alloc/cons_virtual_derivation.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/18_support/bad_cast/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/18_support/bad_cast/cons_virtual_derivation.cc
index 4efc346..358f0c5 100644
--- a/libstdc++-v3/testsuite/18_support/bad_cast/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/18_support/bad_cast/cons_virtual_derivation.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/18_support/bad_exception/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/18_support/bad_exception/cons_virtual_derivation.cc
index b66ce7d..8fb71fe 100644
--- a/libstdc++-v3/testsuite/18_support/bad_exception/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/18_support/bad_exception/cons_virtual_derivation.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/18_support/bad_typeid/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/18_support/bad_typeid/cons_virtual_derivation.cc
index 0da3c9d..9d69eb3 100644
--- a/libstdc++-v3/testsuite/18_support/bad_typeid/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/18_support/bad_typeid/cons_virtual_derivation.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc
index 5c936e2..350f66d 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc
index 86d5bb5..c8870e5 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc
index 8e67ce5..098fb57 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/20_util/bad_function_call/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/20_util/bad_function_call/cons_virtual_derivation.cc
index 6cc46c0..c31563a 100644
--- a/libstdc++-v3/testsuite/20_util/bad_function_call/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/20_util/bad_function_call/cons_virtual_derivation.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc
index 1819726..87bf982 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc
index 07396b0..35602c7 100644
--- a/libstdc++-v3/testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc
index ddc2c46..d6e4e8b 100644
--- a/libstdc++-v3/testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc
index ae6ef0b..81b5214 100644
--- a/libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc
@@ -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
diff --git a/libstdc++-v3/testsuite/util/testsuite_api.h b/libstdc++-v3/testsuite/util/testsuite_api.h
index cbb606c..74b25d2 100644
--- a/libstdc++-v3/testsuite/util/testsuite_api.h
+++ b/libstdc++-v3/testsuite/util/testsuite_api.h
@@ -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 ); }
}
};