aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2007-07-25 15:32:33 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2007-07-25 15:32:33 +0000
commit18efbe51766315fbe4d23dd710f22eab09ee826a (patch)
tree0b584d9d2eb61d779a579fcb783e98c6d4921dfb /libstdc++-v3
parentedb3b6224a89999ad344de7ca6919e2e7a2de4c2 (diff)
downloadgcc-18efbe51766315fbe4d23dd710f22eab09ee826a.zip
gcc-18efbe51766315fbe4d23dd710f22eab09ee826a.tar.gz
gcc-18efbe51766315fbe4d23dd710f22eab09ee826a.tar.bz2
re PR libstdc++/31836 (FAIL: 27_io/basic_istream/extractors_arithmetic/char/12.cc execution test)
PR libstdc++/31836 * config/locale/generic/c_locale.cc (__convert_to_v): Don't use strtold if _GLIBCXX_HAVE_BROKEN_STRTOLD is defined. * config/os/hpux/os_defines.h (_GLIBCXX_HAVE_BROKEN_STRTOLD): Define if __hppa__ is defined. From-SVN: r126914
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog8
-rw-r--r--libstdc++-v3/config/locale/generic/c_locale.cc2
-rw-r--r--libstdc++-v3/config/os/hpux/os_defines.h8
3 files changed, 17 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 7d2e075..99d6153 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,11 @@
+2007-07-25 John Davind Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR libstdc++/31836
+ * config/locale/generic/c_locale.cc (__convert_to_v): Don't use
+ strtold if _GLIBCXX_HAVE_BROKEN_STRTOLD is defined.
+ * config/os/hpux/os_defines.h (_GLIBCXX_HAVE_BROKEN_STRTOLD): Define
+ if __hppa__ is defined.
+
2007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
PR bootstrap/3456
diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
index 732b609..80cef2d 100644
--- a/libstdc++-v3/config/locale/generic/c_locale.cc
+++ b/libstdc++-v3/config/locale/generic/c_locale.cc
@@ -149,7 +149,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
errno = 0;
#endif
-#if defined(_GLIBCXX_HAVE_STRTOLD)
+#if defined(_GLIBCXX_HAVE_STRTOLD) && !defined(_GLIBCXX_HAVE_BROKEN_STRTOLD)
char* __sanity;
long double __ld = strtold(__s, &__sanity);
diff --git a/libstdc++-v3/config/os/hpux/os_defines.h b/libstdc++-v3/config/os/hpux/os_defines.h
index c7ff485..6118a26 100644
--- a/libstdc++-v3/config/os/hpux/os_defines.h
+++ b/libstdc++-v3/config/os/hpux/os_defines.h
@@ -97,4 +97,12 @@ typedef long int __padding_type;
are weak; gthread relies on such unsatisfied references being resolved
to null pointers when weak symbol support is on. */
#define _GLIBCXX_GTHREAD_USE_WEAK 0
+
+// The strtold function is obsolete and not C99 conformant on PA HP-UX.
+// It returns plus or minus _LDBL_MAX instead of plus or minus HUGE_VALL
+// if the correct value would cause overflow. It doesn't handle "inf",
+// "infinity" and "nan". It is not thread safe.
+#if defined (__hppa__)
+#define _GLIBCXX_HAVE_BROKEN_STRTOLD 1
+#endif
#endif