On 11/11/14 10:49 +0100, FX wrote:
The patch below break bootstrap on darwin
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63811):
Fix std::deque move construction with non-equal allocators.
* include/bits/stl_deque.h (_Deque_base::_Deque_base(_Deque_base&&)):
Dispatch according to whether allocators are always equal.
(_Deque_base::_M_move_impl()): Implement move-from state.
In file included from
/Users/fx/devel/gcc/ibin2/x86_64-apple-darwin14.0.0/libstdc++-v3/include/deque:64:0,
from
/Users/fx/devel/gcc/trunk2/libstdc++-v3/include/precompiled/stdc++.h:67:
/Users/fx/devel/gcc/ibin2/x86_64-apple-darwin14.0.0/libstdc++-v3/include/bits/stl_deque.h:
In member function ‘std::_Deque_base<_Tp, _Alloc>::_Deque_impl
std::_Deque_base<_Tp, _Alloc>::_M_move_impl()’:
/Users/fx/devel/gcc/ibin2/x86_64-apple-darwin14.0.0/libstdc++-v3/include/bits/stl_deque.h:645:17:
error: expected primary-expression before ‘__attribute’
_Tp_alloc_type __attribute((__unused__)) {std::move(__alloc)};
^
make[2]: *** [x86_64-apple-darwin14.0.0/bits/stdc++.h.gch/O2ggnu++0x.gch] Error
1
Should be fixed with this renaming.
Tested x86_64-linux, committed to trunk.
commit 3a81c243672bd721f15bc6320fc7a82e850fc3d8
Author: Jonathan Wakely <jwak...@redhat.com>
Date: Tue Nov 11 10:11:09 2014 +0000
PR libstdc++/63811
* include/bits/stl_deque.h (_Deque_base::_M_move_impl()): Avoid using
badname.
diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h
index c0052b3..3a1c85d 100644
--- a/libstdc++-v3/include/bits/stl_deque.h
+++ b/libstdc++-v3/include/bits/stl_deque.h
@@ -642,7 +642,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
// Create a copy of the current allocator.
_Tp_alloc_type __alloc{_M_get_Tp_allocator()};
// Put that copy in a moved-from state.
- _Tp_alloc_type __unused __attribute((__unused__)) {std::move(__alloc)};
+ _Tp_alloc_type __sink __attribute((__unused__)) {std::move(__alloc)};
// Create an empty map that allocates using the moved-from allocator.
_Deque_base __empty{__alloc};
// Now safe to modify current allocator and perform non-throwing swaps.