From ffecec4dce4ee13847608c404695527369e4120f Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Wed, 1 Oct 2008 23:16:19 +0000 Subject: [PATCH] c_locale.cc (__convert_to_v): Fix !__FLT_HAS_INFINITY__ case. 2008-10-01 Andrew Pinski * config/locale/generic/c_locale.cc (__convert_to_v): Fix !__FLT_HAS_INFINITY__ case. From-SVN: r140823 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/config/locale/generic/c_locale.cc | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2ca3b9e0908..b6d61220630 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2008-10-01 Andrew Pinski + + * config/locale/generic/c_locale.cc (__convert_to_v): Fix + !__FLT_HAS_INFINITY__ case. + 2008-09-30 Chris Fairles * include/std/tuple (tuple<>::swap): Implement swap for tuple as per diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc index 67efd9e850f..97e77d57aa0 100644 --- a/libstdc++-v3/config/locale/generic/c_locale.cc +++ b/libstdc++-v3/config/locale/generic/c_locale.cc @@ -97,10 +97,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else if (__overflow #if __FLT_HAS_INFINITY__ || __v == numeric_limits::infinity() - || __v == -numeric_limits::infinity()) + || __v == -numeric_limits::infinity() #else || ((__v > 1.0f || __v < -1.0f) && errno == ERANGE) #endif + ) { if (__v > 0.0f) __v = numeric_limits::max();