c_locale.cc (__convert_to_v): Fix !__FLT_HAS_INFINITY__ case.

2008-10-01  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * config/locale/generic/c_locale.cc (__convert_to_v): Fix
        !__FLT_HAS_INFINITY__ case.

From-SVN: r140823
This commit is contained in:
Andrew Pinski 2008-10-01 23:16:19 +00:00 committed by Andrew Pinski
parent 3e93b27552
commit ffecec4dce
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
* config/locale/generic/c_locale.cc (__convert_to_v): Fix
!__FLT_HAS_INFINITY__ case.
2008-09-30 Chris Fairles <cfairles@gcc.gnu.org>
* include/std/tuple (tuple<>::swap): Implement swap for tuple as per

View File

@ -97,10 +97,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
else if (__overflow
#if __FLT_HAS_INFINITY__
|| __v == numeric_limits<float>::infinity()
|| __v == -numeric_limits<float>::infinity())
|| __v == -numeric_limits<float>::infinity()
#else
|| ((__v > 1.0f || __v < -1.0f) && errno == ERANGE)
#endif
)
{
if (__v > 0.0f)
__v = numeric_limits<float>::max();