OSDN Git Service

Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / testsuite / 21_strings / basic_string / numeric_conversions / char / stod.cc
index f26a865..e4608d1 100644 (file)
@@ -1,12 +1,14 @@
 // { dg-options "-std=gnu++0x" }
+// { dg-require-string-conversions "" }
+
 // 2008-06-15  Paolo Carlini  <paolo.carlini@oracle.com>
 
-// Copyright (C) 2008 Free Software Foundation, Inc.
+// Copyright (C) 2008, 2009 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
 // terms of the GNU General Public License as published by the
-// Free Software Foundation; either version 2, or (at your option)
+// Free Software Foundation; either version 3, or (at your option)
 // any later version.
 
 // This library is distributed in the hope that it will be useful,
@@ -15,9 +17,8 @@
 // GNU General Public License for more details.
 
 // You should have received a copy of the GNU General Public License along
-// with this library; see the file COPYING.  If not, write to the Free
-// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-// USA.
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
 
 // 21.4 Numeric Conversions [string.conversions]
 
@@ -29,8 +30,6 @@
 void
 test01()
 {
-#ifdef _GLIBCXX_USE_C99
-
   bool test __attribute__((unused)) = false;
   using namespace std;
 
@@ -107,7 +106,8 @@ test01()
     }
   VERIFY( test );
 
-  if (sizeof(double) < sizeof(long double))
+  if ((numeric_limits<long double>::max() / 10000.0L)
+      > numeric_limits<double>::max())
     {
       test = false;
       d1 = -1.0;
@@ -128,8 +128,6 @@ test01()
       VERIFY( test );
       VERIFY( d1 == -1.0 );
     }
-
-#endif
 }
 
 int main()