From 2b326d53c29b96a77199666d75430a7d1994bea7 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Sat, 27 Apr 2019 16:09:20 +0200 Subject: [PATCH] Use __restrict for __relocate_object_a 2019-04-27 Marc Glisse PR libstdc++/87106 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the arguments with __restrict. From-SVN: r270624 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/include/bits/stl_uninitialized.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 53065a9dd0b..606244f331c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2019-04-27 Marc Glisse + + PR libstdc++/87106 + * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the + arguments with __restrict. + 2019-04-26 H.J. Lu * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated. diff --git a/libstdc++-v3/include/bits/stl_uninitialized.h b/libstdc++-v3/include/bits/stl_uninitialized.h index 0d42b253df1..b3d44f3eaa4 100644 --- a/libstdc++-v3/include/bits/stl_uninitialized.h +++ b/libstdc++-v3/include/bits/stl_uninitialized.h @@ -884,7 +884,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L template inline void - __relocate_object_a(_Tp* __dest, _Up* __orig, _Allocator& __alloc) + __relocate_object_a(_Tp* __restrict __dest, _Up* __restrict __orig, + _Allocator& __alloc) noexcept(noexcept(std::allocator_traits<_Allocator>::construct(__alloc, __dest, std::move(*__orig))) && noexcept(std::allocator_traits<_Allocator>::destroy( -- 2.30.2