When I previously changed __pbase_type_info::__pointer_catch to be pure
I was overlooking that it was defined in a different header. Oops.
This patch properly fixes the problem that the earlier patch was
intended to fix: an inline function needs to be defined in every
translation unit where it is odr-used, and a virtual function is
odr-used in every translation unit where it is declared.
Tested x86_64-pc-linux-gnu, applied to trunk.
commit eaa08ca87b18a48b1cfc895c6308b79ea1aa04a6
Author: Jason Merrill <ja...@redhat.com>
Date: Tue Jul 1 15:35:15 2014 -0700
PR libstdc++/61728
* libsupc++/cxxabi.h: Define __pbase_type_info::__pointer_catch here.
* libsupc++/tinfo.h: Not here.
diff --git a/libstdc++-v3/libsupc++/cxxabi.h b/libstdc++-v3/libsupc++/cxxabi.h
index 5b77aee..4d9458c 100644
--- a/libstdc++-v3/libsupc++/cxxabi.h
+++ b/libstdc++-v3/libsupc++/cxxabi.h
@@ -298,11 +298,19 @@ namespace __cxxabiv1
__do_catch(const std::type_info* __thr_type, void** __thr_obj,
unsigned int __outer) const;
- virtual bool
+ inline virtual bool
__pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj,
- unsigned __outer) const = 0;
+ unsigned __outer) const;
};
+ inline bool __pbase_type_info::
+ __pointer_catch (const __pbase_type_info *thrown_type,
+ void **thr_obj,
+ unsigned outer) const
+ {
+ return __pointee->__do_catch (thrown_type->__pointee, thr_obj, outer + 2);
+ }
+
// Type information for simple pointers.
class __pointer_type_info : public __pbase_type_info
{
diff --git a/libstdc++-v3/libsupc++/tinfo.h b/libstdc++-v3/libsupc++/tinfo.h
index 7c55f02..3421a5c 100644
--- a/libstdc++-v3/libsupc++/tinfo.h
+++ b/libstdc++-v3/libsupc++/tinfo.h
@@ -31,14 +31,6 @@
namespace __cxxabiv1 {
-inline bool __pbase_type_info::
-__pointer_catch (const __pbase_type_info *thrown_type,
- void **thr_obj,
- unsigned outer) const
-{
- return __pointee->__do_catch (thrown_type->__pointee, thr_obj, outer + 2);
-}
-
namespace {
using namespace std;