[RFA:] fix 27_io/basic_ostream/inserters_arithmetic/char/4402.cc

Hans-Peter Nilsson hans-peter.nilsson@axis.com
Fri Mar 23 19:39:00 GMT 2007


> > Date: Fri, 23 Mar 2007 13:12:53 +0100
> > From: Paolo Carlini <pcarlini@suse.de>
> 
> >     long double val = std::numeric_limits<long double>::max();

This is what I committed:

        * testsuite/27_io/basic_ostream/inserters_arithmetic/char/4402.cc
        (test02): Use std::numeric_limits<>::max() to get suitable large
        values.

--- 4402.cc.orig	Wed Jan  3 13:20:09 2007
+++ 4402.cc	Fri Mar 23 14:50:47 2007
@@ -1,7 +1,7 @@
 // 1999-11-15 Kevin Ediger  <kediger@licor.com>
 // test the floating point inserters (facet num_put)
 
-// Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -33,7 +33,7 @@ test02()
   bool test __attribute__((unused)) = true;
 
   // make sure we can output a very long float
-  long double val = 1.2345678901234567890123456789e+1000L;
+  long double val = std::numeric_limits<long double>::max();
   int prec = numeric_limits<long double>::digits10;
 
   ostringstream os;
@@ -51,7 +51,7 @@ test02()
 
   // Make sure we can output a long float in fixed format
   // without seg-faulting (libstdc++/4402)
-  double val2 = 3.5e230;
+  double val2 = std::numeric_limits<double>::max();
 
   ostringstream os2;
   os2.precision(3);

brgds, H-P



More information about the Libstdc++ mailing list