summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0134-2011-04-17-Daniel-Krugler-daniel.kruegler-googlemail.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-04-30 12:37:47 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-05 12:26:41 +0100
commit478deec11f3349d61b1a922f047dc958dc07262a (patch)
tree1843907b36de2bcb8f821d49d8c9a88014ef0dc7 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0134-2011-04-17-Daniel-Krugler-daniel.kruegler-googlemail.patch
parentd42dccf886983ba14ccc868041d7bea0cf1a260e (diff)
downloadpoky-478deec11f3349d61b1a922f047dc958dc07262a.tar.gz
gcc-4.6.0: Backport FSF 4.6 branch patches
This is set of bugfixes that has been done on FSF gcc-4_2-branch since 4.6.0 was released They will roll into 4.6.1 release once that happens in coming approx 6 months time then we can simply remove them thats the reason so use a separate .inc file to define the SRC_URI additions (From OE-Core rev: b0d5b9f12adbce2c4a0df6059f5671188cd32293) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0134-2011-04-17-Daniel-Krugler-daniel.kruegler-googlemail.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0134-2011-04-17-Daniel-Krugler-daniel.kruegler-googlemail.patch115
1 files changed, 115 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0134-2011-04-17-Daniel-Krugler-daniel.kruegler-googlemail.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0134-2011-04-17-Daniel-Krugler-daniel.kruegler-googlemail.patch
new file mode 100644
index 0000000000..1691211744
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0134-2011-04-17-Daniel-Krugler-daniel.kruegler-googlemail.patch
@@ -0,0 +1,115 @@
1From 1934cdd502a4bad6e1c54c4206b9361909f01083 Mon Sep 17 00:00:00 2001
2From: paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Sun, 17 Apr 2011 21:46:20 +0000
4Subject: [PATCH 134/200] 2011-04-17 Daniel Krugler <daniel.kruegler@googlemail.com>
5 Paolo Carlini <paolo.carlini@oracle.com>
6
7 PR libstdc++/48635 (again)
8 * include/bits/unique_ptr.h (unique_ptr<>::unique_ptr(unique_ptr<>&&),
9 unique_ptr<_Tp[]>::unique_ptr(unique_ptr<>&&),
10 unique_ptr<>::operator=(unique_ptr<>&&),
11 unique_ptr<_Tp[]>::operator=(unique_ptr<>&&)): Use forward<_Ep>, not
12 forward<_Dp>, to forward the deleter.
13 * testsuite/20_util/unique_ptr/assign/48635_neg.cc: New.
14
15
16git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172620 138bc75d-0d04-0410-961f-82ee72b054a4
17
18index 9ab1938..9d5d206 100644
19--- a/libstdc++-v3/include/bits/unique_ptr.h
20+++ b/libstdc++-v3/include/bits/unique_ptr.h
21@@ -153,7 +153,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
22 && std::is_convertible<_Ep, _Dp>::value))>
23 ::type>
24 unique_ptr(unique_ptr<_Up, _Ep>&& __u)
25- : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter()))
26+ : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter()))
27 { }
28
29 #if _GLIBCXX_USE_DEPRECATED
30@@ -186,7 +186,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
31 operator=(unique_ptr<_Up, _Ep>&& __u)
32 {
33 reset(__u.release());
34- get_deleter() = std::forward<deleter_type>(__u.get_deleter());
35+ get_deleter() = std::forward<_Ep>(__u.get_deleter());
36 return *this;
37 }
38
39@@ -306,7 +306,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
40
41 template<typename _Up, typename _Ep>
42 unique_ptr(unique_ptr<_Up, _Ep>&& __u)
43- : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter()))
44+ : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter()))
45 { }
46
47 // Destructor.
48@@ -326,7 +326,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
49 operator=(unique_ptr<_Up, _Ep>&& __u)
50 {
51 reset(__u.release());
52- get_deleter() = std::forward<deleter_type>(__u.get_deleter());
53+ get_deleter() = std::forward<_Ep>(__u.get_deleter());
54 return *this;
55 }
56
57diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635_neg.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635_neg.cc
58new file mode 100644
59index 0000000..1ed53ee
60--- /dev/null
61+++ b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635_neg.cc
62@@ -0,0 +1,50 @@
63+// { dg-options "-std=gnu++0x" }
64+// { dg-do compile }
65+
66+// Copyright (C) 2011 Free Software Foundation
67+//
68+// This file is part of the GNU ISO C++ Library. This library is free
69+// software; you can redistribute it and/or modify it under the
70+// terms of the GNU General Public License as published by the
71+// Free Software Foundation; either version 3, or (at your option)
72+// any later version.
73+
74+// This library is distributed in the hope that it will be useful,
75+// but WITHOUT ANY WARRANTY; without even the implied warranty of
76+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
77+// GNU General Public License for more details.
78+
79+// You should have received a copy of the GNU General Public License
80+// along with this library; see the file COPYING3. If not see
81+// <http://www.gnu.org/licenses/>.
82+
83+#include <memory>
84+
85+struct D;
86+
87+struct B
88+{
89+ B& operator=(D&) = delete; // { dg-error "declared here" }
90+
91+ template<class T>
92+ void operator()(T*) const {}
93+};
94+
95+struct D : B { };
96+
97+// libstdc++/48635
98+void f()
99+{
100+ B b;
101+ D d;
102+
103+ std::unique_ptr<int, B&> ub(nullptr, b);
104+ std::unique_ptr<int, D&> ud(nullptr, d);
105+ ub = std::move(ud);
106+// { dg-error "use of deleted function" "" { target *-*-* } 189 }
107+
108+ std::unique_ptr<int[], B&> uba(nullptr, b);
109+ std::unique_ptr<int[], D&> uda(nullptr, d);
110+ uba = std::move(uda);
111+// { dg-error "use of deleted function" "" { target *-*-* } 329 }
112+}
113--
1141.7.0.4
115