summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-22 16:41:39 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-22 16:41:39 +0000
commit46a8176da2d358b44a69933f45ea9f81af8d61c2 (patch)
treec95e326bb42ba6bf3b8bcb0210bed7e18813bae1 /libstdc++-v3
parent7bd508d9bcee48c5ba4d5dba4db602fcf99ec3e9 (diff)
downloadgcc-46a8176da2d358b44a69933f45ea9f81af8d61c2.tar.gz
PR libstdc++/37522
* include/bits/basic_string.h (stod, stof, stoi, stol, stold, stoll, stoul, stoull, to_string): Only use _GLIBCXX_HAVE_BROKEN_VSWPRINTF to guard definition of to_wstring. * testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc: Do not use dg-require-string-conversions. * testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/ stoull.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/ to_string.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219019 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog27
-rw-r--r--libstdc++-v3/include/bits/basic_string.h5
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc1
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc1
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc1
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc1
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc1
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc1
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc1
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc1
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc1
-rw-r--r--libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc1
12 files changed, 30 insertions, 12 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 4fe8283f96b..29acd975025 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,30 @@
+2014-12-22 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/37522
+ * include/bits/basic_string.h (stod, stof, stoi, stol, stold, stoll,
+ stoul, stoull, to_string): Only use _GLIBCXX_HAVE_BROKEN_VSWPRINTF
+ to guard definition of to_wstring.
+ * testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc:
+ Do not use dg-require-string-conversions.
+ * testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
+ Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc:
+ Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc:
+ Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc:
+ Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc:
+ Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc:
+ Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc:
+ Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/char/
+ stoull.cc: Likewise.
+ * testsuite/21_strings/basic_string/numeric_conversions/char/
+ to_string.cc: Likewise.
+
2014-12-22 Ville Voutilainen <ville.voutilainen@gmail.com>
PR libstdc++/60271
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
index 77293848b0b..6423c59ede2 100644
--- a/libstdc++-v3/include/bits/basic_string.h
+++ b/libstdc++-v3/include/bits/basic_string.h
@@ -5240,8 +5240,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \
- && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
+#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99)
#include <ext/string_conversions.h>
@@ -5392,6 +5391,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
stold(const wstring& __str, size_t* __idx = 0)
{ return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); }
+#ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF
// DR 1261.
inline wstring
to_wstring(int __val)
@@ -5453,6 +5453,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n,
L"%Lf", __val);
}
+#endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF
#endif
_GLIBCXX_END_NAMESPACE_CXX11
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc
index b9de1cd7745..e7fea9ec933 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc
@@ -1,5 +1,4 @@
// { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
// 2009-11-11 Paolo Carlini <paolo.carlini@oracle.com>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc
index 5e3060c46e4..fa9dedb68ff 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc
@@ -1,5 +1,4 @@
// { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
// 2008-06-15 Paolo Carlini <paolo.carlini@oracle.com>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc
index 607f97be183..16b9fc21763 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc
@@ -1,5 +1,4 @@
// { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
// 2008-06-15 Paolo Carlini <paolo.carlini@oracle.com>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc
index 6c0fb98dca9..1032e6e3c78 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc
@@ -1,5 +1,4 @@
// { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
// 2008-06-15 Paolo Carlini <paolo.carlini@oracle.com>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc
index 9cdb4b0a9f5..df6ad787468 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc
@@ -1,5 +1,4 @@
// { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
// 2008-06-15 Paolo Carlini <paolo.carlini@oracle.com>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc
index 039534cd313..e201780c53b 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc
@@ -1,5 +1,4 @@
// { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
// 2008-06-15 Paolo Carlini <paolo.carlini@oracle.com>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc
index dce8fdf63e9..b5ced9f23e4 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc
@@ -1,5 +1,4 @@
// { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
// 2008-06-15 Paolo Carlini <paolo.carlini@oracle.com>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc
index 9cc2609f286..29c462bdc7a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc
@@ -1,5 +1,4 @@
// { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
// 2008-06-15 Paolo Carlini <paolo.carlini@oracle.com>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc
index 8a04e07d679..39004316660 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc
@@ -1,5 +1,4 @@
// { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
// 2008-06-15 Paolo Carlini <paolo.carlini@oracle.com>
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc
index 516e6027a71..4f7f75ac97a 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc
@@ -1,5 +1,4 @@
// { dg-options "-std=gnu++11" }
-// { dg-require-string-conversions "" }
// 2008-06-15 Paolo Carlini <paolo.carlini@oracle.com>