From: Paolo Carlini Date: Sun, 21 Dec 2008 15:56:22 +0000 (+0000) Subject: re PR libstdc++/38596 (tr1_impl/functional incompatible with -fno-rtti) X-Git-Tag: releases/gcc-4.4.0~1151 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c947d638c601375ce799ef4d87f9aa6d5b8972a8;p=thirdparty%2Fgcc.git re PR libstdc++/38596 (tr1_impl/functional incompatible with -fno-rtti) 2008-12-21 Paolo Carlini PR libstdc++/38596 * include/tr1_impl/function (function<>::target, function<>::target_type): Provide only when __GXX_RTTI is defined. (_Function_base::_M_manager, _Ref_manager<>::_M_manager, _Function_handler::_M_manager): Adjust. From-SVN: r142862 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index da8f90b36c13..b0ebadca88bc 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2008-12-21 Paolo Carlini + + PR libstdc++/38596 + * include/tr1_impl/function (function<>::target, + function<>::target_type): Provide only when __GXX_RTTI is defined. + (_Function_base::_M_manager, _Ref_manager<>::_M_manager, + _Function_handler::_M_manager): + Adjust. + 2008-12-19 Ben Elliston * acinclude.m4: Guard a variable test against an empty string. diff --git a/libstdc++-v3/include/tr1_impl/functional b/libstdc++-v3/include/tr1_impl/functional index 4e4864fa62d6..f3d843c9d8cd 100644 --- a/libstdc++-v3/include/tr1_impl/functional +++ b/libstdc++-v3/include/tr1_impl/functional @@ -1531,10 +1531,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 { switch (__op) { +#ifdef __GXX_RTTI case __get_type_info: __dest._M_access() = &typeid(_Functor); break; - +#endif case __get_functor_ptr: __dest._M_access<_Functor*>() = _M_get_pointer(__source); break; @@ -1596,10 +1597,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 { switch (__op) { +#ifdef __GXX_RTTI case __get_type_info: __dest._M_access() = &typeid(_Functor); break; - +#endif case __get_functor_ptr: __dest._M_access<_Functor*>() = *_Base::_M_get_pointer(__source); return is_const<_Functor>::value; @@ -1730,10 +1732,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 { switch (__op) { +#ifdef __GXX_RTTI case __get_type_info: __dest._M_access() = &typeid(_Functor); break; - +#endif case __get_functor_ptr: __dest._M_access<_Functor*>() = &_Base::_M_get_pointer(__source)->__value; @@ -1935,7 +1938,8 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 * stored by @c this. */ _Res operator()(_ArgTypes... __args) const; - + +#ifdef __GXX_RTTI // [3.7.2.5] function target access /** * @brief Determine the type of the target of this function object @@ -1961,7 +1965,8 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 /// @overload template const _Functor* target() const; - +#endif + private: // [3.7.2.6] undefined operators template @@ -2020,6 +2025,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 return _M_invoker(_M_functor, __args...); } +#ifdef __GXX_RTTI template const type_info& function<_Res(_ArgTypes...)>:: @@ -2069,6 +2075,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 else return 0; } +#endif // [3.7.2.7] null pointer comparisons