+2011-10-10 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/49818
+ * config/abi/pre/gnu.ver (CXXABI_1.3.6): Add symbols.
+ * testsuite/util/testsuite_abi.cc: Same.
+ * libsupc++/unwind-cxx.h: Move required eh API...
+ * libsupc++/cxxabi.h: ... to here. Add required forward declarations.
+ Use _GLIBCXX_NOTHROW.
+ * libsupc++/pure.cc (__cxa_deleted_virtual): Add.
+ * libsupc++/eh_alloc.cc: Use _GLIBCXX_NOTHROW.
+ * libsupc++/eh_catch.cc: Same.
+ * libsupc++/eh_globals.cc: Same.
+ * libsupc++/eh_type.cc: Same.
+
2011-10-07 Jonathan Wakely <jwakely.gcc@gmail.com>
* testsuite/util/testsuite_allocator.h (uneq_allocator): Add
std::logic_error*;
std::locale::[A-Za-e]*;
std::locale::facet::[A-Za-z]*;
- std::locale::facet::_S_get_c_locale*;
+ std::locale::facet::_S_get_c_locale*;
std::locale::facet::_S_clone_c_locale*;
std::locale::facet::_S_create_c_locale*;
std::locale::facet::_S_destroy_c_locale*;
std::strstream*;
std::strstreambuf*;
# std::t[a-q]*;
- std::t[a-g]*;
+ std::t[a-g]*;
std::th[a-h]*;
std::th[j-q]*;
std::th[s-z]*;
_ZNKSs8_M_limit*;
_ZNKSs9_M_ibeginEv;
_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_E*;
- _ZNKSs7compare*;
+ _ZNKSs7compare*;
_ZNKSs5c_strEv;
_ZNKSs8capacityEv;
_ZNKSs4copyEPc[jmy][jmy];
# std::locale destructors
_ZNSt6localeD*;
-
+
# std::locale::facet destructors
_ZNSt6locale5facetD*;
-
+
# std::locale::_Impl constructors, destructors
_ZNSt6locale5_ImplC*;
_ZNSt6locale5_ImplD*;
_ZNSt8ios_baseD*;
_ZNSt8ios_base4InitD*;
- # bool std::has_facet
+ # bool std::has_facet
_ZSt9has_facetIS*;
# std::use_facet
# std::time_get_byname
_ZNSt15time_get_byname*;
-
+
# std::time_put
_ZNSt8time_put*;
_ZNKSt8time_put*;
_ZNK11__gnu_debug16_Error_formatter13_M_print_word*;
_ZNK11__gnu_debug16_Error_formatter15_M_print_string*;
_ZNK11__gnu_debug16_Error_formatter8_M_error*;
-
+
# exceptions as functions
_ZSt16__throw_bad_castv;
_ZSt17__throw_bad_allocv;
};
GLIBCXX_3.4.1 {
-
+
_ZNSt12__basic_fileIcE4fileEv;
-
+
} GLIBCXX_3.4;
-
+
GLIBCXX_3.4.2 {
_ZN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EE4fileEv;
} GLIBCXX_3.4.1;
GLIBCXX_3.4.3 {
-
+
# stub functions from libmath
acosf;
acosl;
_ZNKSt4hashIeEclEe;
_ZSt17__verify_grouping*;
-
+
_ZNSt8__detail12__prime_listE;
_ZNSt3tr18__detail12__prime_listE;
} GLIBCXX_3.4.9;
GLIBCXX_3.4.11 {
-
+
# atomic
__atomic_flag_for_address;
__atomic_flag_wait_explicit;
__cxa_rethrow;
__cxa_throw;
__cxa_type_match;
+ __cxa_vec_ctor;
__cxa_vec_cctor;
__cxa_vec_cleanup;
- __cxa_vec_ctor;
+ __cxa_vec_delete;
__cxa_vec_delete2;
__cxa_vec_delete3;
- __cxa_vec_delete;
__cxa_vec_dtor;
+ __cxa_vec_new;
__cxa_vec_new2;
__cxa_vec_new3;
- __cxa_vec_new;
__gxx_personality_v0;
__gxx_personality_sj0;
__dynamic_cast;
_ZTVSt16nested_exception;
} CXXABI_1.3.4;
+
+CXXABI_1.3.6 {
+
+ __cxa_allocate_dependent_exception;
+ __cxa_free_dependent_exception;
+ __cxa_get_exception_ptr;
+ __cxa_deleted_virtual;
+
+} CXXABI_1.3.5;
\ No newline at end of file
void
__cxa_guard_abort(__guard*) _GLIBCXX_NOTHROW;
+ // DSO destruction.
+ int
+ __cxa_atexit(void (*)(void*), void*, void*) _GLIBCXX_NOTHROW;
+
+ int
+ __cxa_finalize(void*);
+
// Pure virtual functions.
void
__cxa_pure_virtual(void) __attribute__ ((__noreturn__));
- // Exception handling.
void
- __cxa_bad_cast();
+ __cxa_deleted_virtual(void) __attribute__ ((__noreturn__));
- void
- __cxa_bad_typeid();
-
- // DSO destruction.
- int
- __cxa_atexit(void (*)(void*), void*, void*) _GLIBCXX_NOTHROW;
+ // Exception handling auxillary.
+ void
+ __cxa_bad_cast() __attribute__((__noreturn__));
- int
- __cxa_finalize(void*);
+ void
+ __cxa_bad_typeid() __attribute__((__noreturn__));
/**
char*
__cxa_demangle(const char* __mangled_name, char* __output_buffer,
size_t* __length, int* __status);
+
#ifdef __cplusplus
}
} // namespace __cxxabiv1
__upcast_result& __restrict __result) const;
};
+ // Exception handling forward declarations.
+ struct __cxa_exception;
+ struct __cxa_refcounted_exception;
+ struct __cxa_dependent_exception;
+ struct __cxa_eh_globals;
+
+ extern "C"
+ {
// Dynamic cast runtime.
+
// src2dst has the following possible values
// >-1: src_type is a unique public non-virtual base of dst_type
// dst_ptr + src2dst == src_ptr
// -1: unspecified relationship
// -2: src_type is not a public base of dst_type
// -3: src_type is a multiple public non-virtual base of dst_type
- extern "C" void*
+ void*
__dynamic_cast(const void* __src_ptr, // Starting object.
const __class_type_info* __src_type, // Static type of object.
const __class_type_info* __dst_type, // Desired target type.
ptrdiff_t __src2dst); // How src and dst are related.
+ // Exception handling runtime.
+
+ // The __cxa_eh_globals for the current thread can be obtained by using
+ // either of the following functions. The "fast" version assumes at least
+ // one prior call of __cxa_get_globals has been made from the current
+ // thread, so no initialization is necessary.
+ __cxa_eh_globals*
+ __cxa_get_globals() _GLIBCXX_NOTHROW __attribute__ ((__const__));
+
+ __cxa_eh_globals*
+ __cxa_get_globals_fast() _GLIBCXX_NOTHROW __attribute__ ((__const__));
+
+ // Allocate memory for the primary exception plus the thrown object.
+ void*
+ __cxa_allocate_exception(size_t) _GLIBCXX_NOTHROW;
+
+ // Free the space allocated for the primary exception.
+ void
+ __cxa_free_exception(void*) _GLIBCXX_NOTHROW;
+
+ // Throw the exception.
+ void
+ __cxa_throw(void*, std::type_info*, void (*) (void *))
+ __attribute__((__noreturn__));
+
+ // Used to implement exception handlers.
+ void*
+ __cxa_get_exception_ptr(void*) _GLIBCXX_NOTHROW __attribute__ ((__pure__));
+
+ void*
+ __cxa_begin_catch(void*) _GLIBCXX_NOTHROW;
+
+ void
+ __cxa_end_catch();
+
+ void
+ __cxa_rethrow() __attribute__((__noreturn__));
+
// Returns the type_info for the currently handled exception [15.3/8], or
// null if there is none.
- extern "C" std::type_info*
+ std::type_info*
__cxa_current_exception_type() _GLIBCXX_NOTHROW __attribute__ ((__pure__));
+ // GNU Extensions.
+
+ // Allocate memory for a dependent exception.
+ __cxa_dependent_exception*
+ __cxa_allocate_dependent_exception() _GLIBCXX_NOTHROW;
+
+ // Free the space allocated for the dependent exception.
+ void
+ __cxa_free_dependent_exception(__cxa_dependent_exception*) _GLIBCXX_NOTHROW;
+
+ } // extern "C"
+
// A magic placeholder class that can be caught by reference
// to recognize foreign exceptions.
class __foreign_exception
{
- virtual ~__foreign_exception() _GLIBCXX_NOTHROW;
+ virtual ~__foreign_exception() throw();
virtual void __pure_dummy() = 0; // prevent catch by value
};
// -*- C++ -*- Allocate exception objects.
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2011
// Free Software Foundation, Inc.
//
// This file is part of GCC.
}
extern "C" void *
-__cxxabiv1::__cxa_allocate_exception(std::size_t thrown_size) throw()
+__cxxabiv1::__cxa_allocate_exception(std::size_t thrown_size) _GLIBCXX_NOTHROW
{
void *ret;
extern "C" void
-__cxxabiv1::__cxa_free_exception(void *vptr) throw()
+__cxxabiv1::__cxa_free_exception(void *vptr) _GLIBCXX_NOTHROW
{
char *base = (char *) emergency_buffer;
char *ptr = (char *) vptr;
extern "C" __cxa_dependent_exception*
-__cxxabiv1::__cxa_allocate_dependent_exception() throw()
+__cxxabiv1::__cxa_allocate_dependent_exception() _GLIBCXX_NOTHROW
{
__cxa_dependent_exception *ret;
extern "C" void
__cxxabiv1::__cxa_free_dependent_exception
- (__cxa_dependent_exception *vptr) throw()
+ (__cxa_dependent_exception *vptr) _GLIBCXX_NOTHROW
{
char *base = (char *) dependents_buffer;
char *ptr = (char *) vptr;
// -*- C++ -*- Exception handling routines for catching.
-// Copyright (C) 2001, 2003, 2004, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003, 2004, 2009, 2011 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
using namespace __cxxabiv1;
extern "C" void *
-__cxxabiv1::__cxa_get_exception_ptr(void *exc_obj_in) throw()
+__cxxabiv1::__cxa_get_exception_ptr(void *exc_obj_in) _GLIBCXX_NOTHROW
{
_Unwind_Exception *exceptionObject
= reinterpret_cast <_Unwind_Exception *>(exc_obj_in);
}
extern "C" void *
-__cxxabiv1::__cxa_begin_catch (void *exc_obj_in) throw()
+__cxxabiv1::__cxa_begin_catch (void *exc_obj_in) _GLIBCXX_NOTHROW
{
_Unwind_Exception *exceptionObject
= reinterpret_cast <_Unwind_Exception *>(exc_obj_in);
// -*- C++ -*- Manage the thread-local exception globals.
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2011
// Free Software Foundation, Inc.
//
// This file is part of GCC.
namespace
{
abi::__cxa_eh_globals*
- get_global() throw()
+ get_global() _GLIBCXX_NOTHROW
{
static __thread abi::__cxa_eh_globals global;
return &global;
} // anonymous namespace
extern "C" __cxa_eh_globals*
-__cxxabiv1::__cxa_get_globals_fast() throw()
+__cxxabiv1::__cxa_get_globals_fast() _GLIBCXX_NOTHROW
{ return get_global(); }
extern "C" __cxa_eh_globals*
-__cxxabiv1::__cxa_get_globals() throw()
+__cxxabiv1::__cxa_get_globals() _GLIBCXX_NOTHROW
{ return get_global(); }
static __eh_globals_init init;
extern "C" __cxa_eh_globals*
-__cxxabiv1::__cxa_get_globals_fast() throw()
+__cxxabiv1::__cxa_get_globals_fast() _GLIBCXX_NOTHROW
{
__cxa_eh_globals* g;
if (init._M_init)
}
extern "C" __cxa_eh_globals*
-__cxxabiv1::__cxa_get_globals() throw()
+__cxxabiv1::__cxa_get_globals() _GLIBCXX_NOTHROW
{
__cxa_eh_globals* g;
if (init._M_init)
#else
extern "C" __cxa_eh_globals*
-__cxxabiv1::__cxa_get_globals_fast() throw()
+__cxxabiv1::__cxa_get_globals_fast() _GLIBCXX_NOTHROW
{ return &eh_globals; }
extern "C" __cxa_eh_globals*
-__cxxabiv1::__cxa_get_globals() throw()
+__cxxabiv1::__cxa_get_globals() _GLIBCXX_NOTHROW
{ return &eh_globals; }
#endif
// -*- C++ -*- Exception handling routines for catching.
-// Copyright (C) 2001, 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2008, 2009, 2011 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// Returns the type_info for the currently handled exception [15.3/8], or
// null if there is none.
extern "C"
-std::type_info *__cxa_current_exception_type () throw()
+std::type_info *__cxa_current_exception_type () _GLIBCXX_NOTHROW
{
__cxa_eh_globals *globals = __cxa_get_globals ();
__cxa_exception *header = globals->caughtExceptions;
// -*- C++ -*-
-// Copyright (C) 2000, 2001, 2009 Free Software Foundation
+// Copyright (C) 2000, 2001, 2009, 2011 Free Software Foundation
//
// This file is part of GCC.
//
writestr ("pure virtual method called\n");
std::terminate ();
}
+
+extern "C" void
+__cxxabiv1::__cxa_deleted_virtual (void)
+{
+ writestr ("deleted virtual method called\n");
+ std::terminate ();
+}
#include <cstddef>
#include "unwind.h"
#include <bits/atomic_word.h>
+#include <cxxabi.h>
#pragma GCC visibility push(default)
#endif
};
-
-// The __cxa_eh_globals for the current thread can be obtained by using
-// either of the following functions. The "fast" version assumes at least
-// one prior call of __cxa_get_globals has been made from the current
-// thread, so no initialization is necessary.
-extern "C" __cxa_eh_globals *__cxa_get_globals () throw()
- __attribute__ ((__const__));
-extern "C" __cxa_eh_globals *__cxa_get_globals_fast () throw()
- __attribute__ ((__const__));
-
-// Allocate memory for the primary exception plus the thrown object.
-extern "C" void *__cxa_allocate_exception(std::size_t thrown_size) throw();
-
-// Free the space allocated for the primary exception.
-extern "C" void __cxa_free_exception(void *thrown_exception) throw();
-
-// Allocate memory for a dependent exception.
-extern "C" __cxa_dependent_exception*
-__cxa_allocate_dependent_exception() throw();
-
-// Free the space allocated for the dependent exception.
-extern "C" void
-__cxa_free_dependent_exception(__cxa_dependent_exception *ex) throw();
-
-// Throw the exception.
-extern "C" void __cxa_throw (void *thrown_exception,
- std::type_info *tinfo,
- void (*dest) (void *))
- __attribute__((__noreturn__));
-
-// Used to implement exception handlers.
-extern "C" void *__cxa_get_exception_ptr (void *) throw()
- __attribute__ ((__pure__));
-extern "C" void *__cxa_begin_catch (void *) throw();
-extern "C" void __cxa_end_catch ();
-extern "C" void __cxa_rethrow () __attribute__((__noreturn__));
-
-// These facilitate code generation for recurring situations.
-extern "C" void __cxa_bad_cast () __attribute__((__noreturn__));
-extern "C" void __cxa_bad_typeid () __attribute__((__noreturn__));
-
// @@@ These are not directly specified by the IA-64 C++ ABI.
// Handles re-checking the exception specification if unexpectedHandler
known_versions.push_back("CXXABI_1.3.3");
known_versions.push_back("CXXABI_1.3.4");
known_versions.push_back("CXXABI_1.3.5");
+ known_versions.push_back("CXXABI_1.3.6");
known_versions.push_back("CXXABI_LDBL_1.3");
}
compat_list::iterator begin = known_versions.begin();