summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0199-2011-04-29-Paolo-Carlini-paolo.carlini-oracle.com.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-06-17 17:11:43 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-23 11:50:07 +0100
commit0faa5f72999fea82fadda8bab70abea2303216c7 (patch)
tree05a8c18d2f67d883f94d2bd6f060ab0f4ac7f156 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0199-2011-04-29-Paolo-Carlini-paolo.carlini-oracle.com.patch
parentc2007ba4cdb64fa9e308d3dae395c03ef4cc9161 (diff)
downloadpoky-0faa5f72999fea82fadda8bab70abea2303216c7.tar.gz
gcc-4.6: Switch to using svn SRC_URI for recipe
We call the recipes 4.6 Remove the backport patches (From OE-Core rev: 68b545f4ff719f2b6e57d68b002dc9845c7a14ae) 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/0199-2011-04-29-Paolo-Carlini-paolo.carlini-oracle.com.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0199-2011-04-29-Paolo-Carlini-paolo.carlini-oracle.com.patch137
1 files changed, 0 insertions, 137 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0199-2011-04-29-Paolo-Carlini-paolo.carlini-oracle.com.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0199-2011-04-29-Paolo-Carlini-paolo.carlini-oracle.com.patch
deleted file mode 100644
index af769cd2f8..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0199-2011-04-29-Paolo-Carlini-paolo.carlini-oracle.com.patch
+++ /dev/null
@@ -1,137 +0,0 @@
1From 838560450136f202dc9170f2ad3eec80b41e0381 Mon Sep 17 00:00:00 2001
2From: paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Fri, 29 Apr 2011 23:19:59 +0000
4Subject: [PATCH] 2011-04-29 Paolo Carlini <paolo.carlini@oracle.com>
5
6 PR libstdc++/48760
7 * include/std/complex (complex<float>::complex(float, float),
8 complex<double>::complex(double, double),
9 complex<long double>::complex(long double, long double)): Initialize
10 in the body in C++03 mode (no fix in C++0x mode).
11 * testsuite/26_numerics/complex/cons/48760.cc: New.
12
13
14git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@173195 138bc75d-0d04-0410-961f-82ee72b054a4
15
16index d36eddc..aa6e81d 100644
17--- a/libstdc++-v3/include/std/complex
18+++ b/libstdc++-v3/include/std/complex
19@@ -1046,7 +1046,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
20 _GLIBCXX_CONSTEXPR complex(_ComplexT __z) : _M_value(__z) { }
21
22 _GLIBCXX_CONSTEXPR complex(float __r = 0.0f, float __i = 0.0f)
23+#ifdef __GXX_EXPERIMENTAL_CXX0X__
24+ // The list-initialization extension to __complex__ types is
25+ // not available in GCC 4.6. Thus libstdc++/48760 cannot be
26+ // fixed in C++0x mode, unfortunately.
27 : _M_value(__r + __i * 1.0fi) { }
28+#else
29+ {
30+ __real__ _M_value = __r;
31+ __imag__ _M_value = __i;
32+ }
33+#endif
34
35 explicit _GLIBCXX_CONSTEXPR complex(const complex<double>&);
36 explicit _GLIBCXX_CONSTEXPR complex(const complex<long double>&);
37@@ -1186,7 +1196,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
38 _GLIBCXX_CONSTEXPR complex(_ComplexT __z) : _M_value(__z) { }
39
40 _GLIBCXX_CONSTEXPR complex(double __r = 0.0, double __i = 0.0)
41+#ifdef __GXX_EXPERIMENTAL_CXX0X__
42+ // The list-initialization extension to __complex__ types is
43+ // not available in GCC 4.6. Thus libstdc++/48760 cannot be
44+ // fixed in C++0x mode, unfortunately.
45 : _M_value(__r + __i * 1.0i) { }
46+#else
47+ {
48+ __real__ _M_value = __r;
49+ __imag__ _M_value = __i;
50+ }
51+#endif
52
53 _GLIBCXX_CONSTEXPR complex(const complex<float>& __z)
54 : _M_value(__z.__rep()) { }
55@@ -1328,7 +1348,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
56
57 _GLIBCXX_CONSTEXPR complex(long double __r = 0.0L,
58 long double __i = 0.0L)
59+#ifdef __GXX_EXPERIMENTAL_CXX0X__
60+ // The list-initialization extension to __complex__ types is
61+ // not available in GCC 4.6. Thus libstdc++/48760 cannot be
62+ // fixed in C++0x mode, unfortunately.
63 : _M_value(__r + __i * 1.0Li) { }
64+#else
65+ {
66+ __real__ _M_value = __r;
67+ __imag__ _M_value = __i;
68+ }
69+#endif
70
71 _GLIBCXX_CONSTEXPR complex(const complex<float>& __z)
72 : _M_value(__z.__rep()) { }
73diff --git a/libstdc++-v3/testsuite/26_numerics/complex/cons/48760.cc b/libstdc++-v3/testsuite/26_numerics/complex/cons/48760.cc
74new file mode 100644
75index 0000000..0201cc7
76--- /dev/null
77+++ b/libstdc++-v3/testsuite/26_numerics/complex/cons/48760.cc
78@@ -0,0 +1,56 @@
79+// Copyright (C) 2011 Free Software Foundation, Inc.
80+//
81+// This file is part of the GNU ISO C++ Library. This library is free
82+// software; you can redistribute it and/or modify it under the
83+// terms of the GNU General Public License as published by the
84+// Free Software Foundation; either version 3, or (at your option)
85+// any later version.
86+
87+// This library is distributed in the hope that it will be useful,
88+// but WITHOUT ANY WARRANTY; without even the implied warranty of
89+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
90+// GNU General Public License for more details.
91+
92+// You should have received a copy of the GNU General Public License along
93+// with this library; see the file COPYING3. If not see
94+// <http://www.gnu.org/licenses/>.
95+
96+#include <complex>
97+#include <limits>
98+#include <testsuite_hooks.h>
99+
100+template<typename T>
101+ void do_test01()
102+ {
103+ bool test __attribute__((unused)) = true;
104+
105+ if (std::numeric_limits<T>::has_quiet_NaN)
106+ {
107+ std::complex<T> c1(T(0), std::numeric_limits<T>::quiet_NaN());
108+ VERIFY( c1.real() == T(0) );
109+ VERIFY( std::isnan(c1.imag()) );
110+
111+ std::complex<T> c2(std::numeric_limits<T>::quiet_NaN(), T(0));
112+ VERIFY( std::isnan(c2.real()) );
113+ VERIFY( c2.imag() == T(0) );
114+
115+ std::complex<T> c3(std::numeric_limits<T>::quiet_NaN(),
116+ std::numeric_limits<T>::quiet_NaN());
117+ VERIFY( std::isnan(c3.real()) );
118+ VERIFY( std::isnan(c3.imag()) );
119+ }
120+ }
121+
122+// libstdc++/48760
123+void test01()
124+{
125+ do_test01<float>();
126+ do_test01<double>();
127+ do_test01<long double>();
128+}
129+
130+int main()
131+{
132+ test01();
133+ return 0;
134+}
135--
1361.7.0.4
137