]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorPaolo Carlini <paolo@gcc.gnu.org>
Sat, 4 Apr 2009 23:09:02 +0000 (23:09 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sat, 4 Apr 2009 23:09:02 +0000 (23:09 +0000)
2009-04-05  Edward M. Smith-Rowland  <3dw4rd@verizon.net>

* include/bits/random.h (struct _ShiftMin1): Fix small typo and
thinko.
* testsuite/26_numerics/random/mersenne_twister_engine/cons/
default.cc: Enable.

2009-04-05  Paolo Carlini  <paolo.carlini@oracle.com>

PR libstdc++/39629 (partial)
* testsuite/26_numerics/random/independent_bits_engine/cons/
base_move.cc: Use uint_fast64_t instead of unsigned long.
* testsuite/26_numerics/random/independent_bits_engine/cons/
seed1.cc: Likewise.
* testsuite/26_numerics/random/independent_bits_engine/cons/
seed2.cc: Likewise.
* testsuite/26_numerics/random/independent_bits_engine/cons/
base_copy.cc: Likewise.
* testsuite/26_numerics/random/independent_bits_engine/cons/
default.cc: Likewise.
* testsuite/26_numerics/random/independent_bits_engine/cons/
seed_seq.cc: Likewise.
* testsuite/26_numerics/random/independent_bits_engine/
requirements/typedefs.cc: Likewise.
* testsuite/26_numerics/random/independent_bits_engine/
operators/equal.cc: Likewise.
* testsuite/26_numerics/random/independent_bits_engine/
operators/serialize.cc: Likewise.
* testsuite/26_numerics/random/mt19937_64.cc: Use ull.

From-SVN: r145553

13 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.h
libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/base_copy.cc
libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/base_move.cc
libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/seed1.cc
libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/seed2.cc
libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/cons/seed_seq.cc
libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/operators/equal.cc
libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/operators/serialize.cc
libstdc++-v3/testsuite/26_numerics/random/independent_bits_engine/requirements/typedefs.cc
libstdc++-v3/testsuite/26_numerics/random/mersenne_twister_engine/cons/default.cc
libstdc++-v3/testsuite/26_numerics/random/mt19937_64.cc

index f0b1da6b2e1a6a6af9236265208cae019436f634..e399ccb881b1ca3434c7f8c2566b4d2972857b7f 100644 (file)
@@ -1,3 +1,33 @@
+2009-04-05  Edward M. Smith-Rowland  <3dw4rd@verizon.net>
+
+       * include/bits/random.h (struct _ShiftMin1): Fix small typo and
+       thinko.
+       * testsuite/26_numerics/random/mersenne_twister_engine/cons/
+       default.cc: Enable.
+
+2009-04-05  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR libstdc++/39629 (partial)
+       * testsuite/26_numerics/random/independent_bits_engine/cons/
+       base_move.cc: Use uint_fast64_t instead of unsigned long.
+       * testsuite/26_numerics/random/independent_bits_engine/cons/
+       seed1.cc: Likewise.
+       * testsuite/26_numerics/random/independent_bits_engine/cons/
+       seed2.cc: Likewise.
+       * testsuite/26_numerics/random/independent_bits_engine/cons/
+       base_copy.cc: Likewise.
+       * testsuite/26_numerics/random/independent_bits_engine/cons/
+       default.cc: Likewise.
+       * testsuite/26_numerics/random/independent_bits_engine/cons/
+       seed_seq.cc: Likewise.
+       * testsuite/26_numerics/random/independent_bits_engine/
+       requirements/typedefs.cc: Likewise.
+       * testsuite/26_numerics/random/independent_bits_engine/
+       operators/equal.cc: Likewise.
+       * testsuite/26_numerics/random/independent_bits_engine/
+       operators/serialize.cc: Likewise.
+       * testsuite/26_numerics/random/mt19937_64.cc: Use ull.
+
 2009-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/tr1_impl/random: Remove, empty.
index 33cf513a99202f9231ca18a36131f2b59f015dde..b2520e2bc823e8f2734fa3c653686ad4a305099d 100644 (file)
@@ -78,14 +78,17 @@ namespace std
             bool = __w <static_cast<size_t>
                         (std::numeric_limits<_UIntType>::digits)>
       struct _ShiftMin1
-      { 
+      {
        static const _UIntType __value =
-         __gnu_cxx::__numeric_traits<_UIntType>::max;
+         __gnu_cxx::__numeric_traits<_UIntType>::__max;
       };
 
     template<typename _UIntType, size_t __w>
       struct _ShiftMin1<_UIntType, __w, true>
-      { static const _UIntType __value = _UIntType(1) << __w - _UIntType(1); };
+      {
+       static const _UIntType __value =
+         (_UIntType(1) << __w) - _UIntType(1);
+      };
 
     template<typename _Tp, _Tp __a, _Tp __c, _Tp __m, bool>
       struct _Mod;
index efaa94b2f64eae0a0e74bdc8dc6bd743e07ca181..e66d0147fe95e9d6f12ffa47b97186e13e933a58 100644 (file)
@@ -2,7 +2,7 @@
 //
 // 2008-12-07  Edward M. Smith-Rowland <3dw4rd@verizon.net>
 //
-// 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
@@ -36,7 +36,7 @@ test01()
 
   base_engine b;
 
-  std::independent_bits_engine<base_engine, 48, unsigned long> e(b);
+  std::independent_bits_engine<base_engine, 48, uint_fast64_t> e(b);
 }
 
 int main()
index 8adcecd25ef8ee272d508a033dfaaa6d37fac4e3..acbe40288921bf219037579e495c1986486dc8fc 100644 (file)
@@ -2,7 +2,7 @@
 //
 // 2008-12-07  Edward M. Smith-Rowland <3dw4rd@verizon.net>
 //
-// 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
@@ -34,7 +34,7 @@ test01()
   typedef std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>
     base_engine;
 
-  std::independent_bits_engine<base_engine, 48, unsigned long>
+  std::independent_bits_engine<base_engine, 48, uint_fast64_t>
     e(std::move(base_engine()));
 }
 
index 2ccd4e8d557c909b61ece05a952249ec92525d78..e41220a2c0f6b2d1d751ffcbe1cdd3c1fbce7e7b 100644 (file)
@@ -2,7 +2,7 @@
 //
 // 2008-12-07  Edward M. Smith-Rowland <3dw4rd@verizon.net>
 //
-// 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
@@ -35,7 +35,7 @@ test01()
     <
       std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
       48,
-      unsigned long
+      uint_fast64_t
     > e;
 }
 
index e774b760c9ce77646621b15e29d832a24c1fb226..22ff231c89aee2d20b6cd9f1499a07f98807a790 100644 (file)
@@ -2,7 +2,7 @@
 //
 // 2008-12-07  Edward M. Smith-Rowland <3dw4rd@verizon.net>
 //
-// 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
@@ -37,7 +37,7 @@ test01()
     <
       std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
       48,
-      unsigned long
+      uint_fast64_t
     > e(seed);
 }
 
index e4362d6165dbc0f2e77aa66ea4d833775bdad94a..6f1880f5c9c462be7dd018a947669fca11ff76db 100644 (file)
@@ -2,7 +2,7 @@
 //
 // 2008-12-07  Edward M. Smith-Rowland <3dw4rd@verizon.net>
 //
-// 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
@@ -37,7 +37,7 @@ test01()
     <
       std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
       48,
-      unsigned long
+      uint_fast64_t
     > e(seed);
 }
 
index 628af20b96f9adb0f0ea6481ca639fd8c5655a34..275f5d2a025b347d62364d8ebdc456dc192871c2 100644 (file)
@@ -2,7 +2,7 @@
 //
 // 2008-12-07  Edward M. Smith-Rowland <3dw4rd@verizon.net>
 //
-// 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
@@ -37,7 +37,7 @@ test01()
     <
       std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
       48,
-      unsigned long
+      uint_fast64_t
     > e(seq);
 }
 
index 6147cf0d5ac70a5bdd4964094adbc7079d6af92d..825486969512f9cbb9bd8e1dad3f3472d8163327 100644 (file)
@@ -2,7 +2,7 @@
 //
 // 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
 //
-// 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
@@ -33,7 +33,7 @@ test01()
 
   std::independent_bits_engine
     <std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
-     48, unsigned long> u, v;
+     48, uint_fast64_t> u, v;
 
   VERIFY( u == v );
 
index a92553e10cd5726b2fdcf4e1f737c11cc5b39cb9..d140c8b3efc545f97bd5df6d937a80fcd7ac742a 100644 (file)
@@ -2,7 +2,7 @@
 //
 // 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
 //
-// 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
@@ -35,7 +35,7 @@ test01()
   std::stringstream str;
   std::independent_bits_engine
     <std::subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>,
-     48, unsigned long> u, v;
+     48, uint_fast64_t> u, v;
 
   u(); // advance
   str << u;
index f268e9ad80857069148b5793f8fc740d875396af..d37c156cbce73672e2200abf1afc73a0bf06c5e8 100644 (file)
@@ -3,7 +3,7 @@
 //
 // 2008-11-24  Edward M. Smith-Rowland <3dw4rd@verizon.net>
 //
-// 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
@@ -35,7 +35,7 @@ test01()
         <
           uint_fast64_t, 48, 5, 12
         >,
-      48, unsigned long
+      48, uint_fast64_t
     > test_type;
 
   typedef test_type::result_type result_type;
index e335b82217b941bab5aec8fe0a4cfab4671432a3..8125178f8345545bdcc9789623d375e091bbc11a 100644 (file)
@@ -40,7 +40,7 @@ test01()
     0xefc60000ul, 18, 1812433253ul> x;
 
   VERIFY( x.min() == 0 );
-  // XXX  VERIFY( x.max() == 4294967295ul);
+  VERIFY( x.max() == 4294967295ul );
   VERIFY( x() == 3499211612ul );
 }
 
index 2ec8a54ce5e9a21121be7055681292d960d20273..b557fd3956fa0b24cf9902f9baf3deadcd2b669a 100644 (file)
@@ -2,7 +2,7 @@
 //
 // 2008-11-18  Edward M. Smith-Rowland <3dw4rd@verizon.net>
 //
-// Copyright (C) 2006, 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
@@ -34,7 +34,7 @@ test01()
   std::mt19937_64 a;
   a.discard(9999);
 
-  VERIFY( a() == 9981545732273789042ul );
+  VERIFY( a() == 9981545732273789042ull );
 }
 
 int main()