mirror of git://gcc.gnu.org/git/gcc.git
PR libstdc++/45093 avoid warnings for _M_destroy_node
PR libstdc++/45093 * include/bits/stl_tree.h (_Rb_tree::_M_destroy_node(_Link_type)): Combine definitions to avoid --detect-odr-violations warning. From-SVN: r263516
This commit is contained in:
parent
2383ed0269
commit
ca086dda97
|
|
@ -1,5 +1,9 @@
|
||||||
2018-08-13 Jonathan Wakely <jwakely@redhat.com>
|
2018-08-13 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
|
PR libstdc++/45093
|
||||||
|
* include/bits/stl_tree.h (_Rb_tree::_M_destroy_node(_Link_type)):
|
||||||
|
Combine definitions to avoid --detect-odr-violations warning.
|
||||||
|
|
||||||
* libsupc++/new_opa.cc (operator new(size_t, align_val_t)): Use
|
* libsupc++/new_opa.cc (operator new(size_t, align_val_t)): Use
|
||||||
__is_pow2 to check for valid alignment. Avoid branching when rounding
|
__is_pow2 to check for valid alignment. Avoid branching when rounding
|
||||||
size to multiple of alignment.
|
size to multiple of alignment.
|
||||||
|
|
|
||||||
|
|
@ -626,10 +626,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
_M_construct_node(__tmp, __x);
|
_M_construct_node(__tmp, __x);
|
||||||
return __tmp;
|
return __tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
_M_destroy_node(_Link_type __p)
|
|
||||||
{ get_allocator().destroy(__p->_M_valptr()); }
|
|
||||||
#else
|
#else
|
||||||
template<typename... _Args>
|
template<typename... _Args>
|
||||||
void
|
void
|
||||||
|
|
@ -658,14 +654,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
_M_construct_node(__tmp, std::forward<_Args>(__args)...);
|
_M_construct_node(__tmp, std::forward<_Args>(__args)...);
|
||||||
return __tmp;
|
return __tmp;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
_M_destroy_node(_Link_type __p) noexcept
|
_M_destroy_node(_Link_type __p) _GLIBCXX_NOEXCEPT
|
||||||
{
|
{
|
||||||
|
#if __cplusplus < 201103L
|
||||||
|
get_allocator().destroy(__p->_M_valptr());
|
||||||
|
#else
|
||||||
_Alloc_traits::destroy(_M_get_Node_allocator(), __p->_M_valptr());
|
_Alloc_traits::destroy(_M_get_Node_allocator(), __p->_M_valptr());
|
||||||
__p->~_Rb_tree_node<_Val>();
|
__p->~_Rb_tree_node<_Val>();
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_M_drop_node(_Link_type __p) _GLIBCXX_NOEXCEPT
|
_M_drop_node(_Link_type __p) _GLIBCXX_NOEXCEPT
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue