2009-06-29 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Jun 2009 01:25:52 +0000 (01:25 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Jun 2009 01:25:52 +0000 (01:25 +0000)
* include/bits/random.tcc
(linear_congruential_engine<>::seed(seed_seq&)): Use uint_least32_t
as array type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149078 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.tcc

index 6704b43..f123217 100644 (file)
@@ -1,5 +1,11 @@
 2009-06-29  Paolo Carlini  <paolo.carlini@oracle.com>
 
+       * include/bits/random.tcc
+       (linear_congruential_engine<>::seed(seed_seq&)): Use uint_least32_t
+       as array type.
+
+2009-06-29  Paolo Carlini  <paolo.carlini@oracle.com>
+
        * include/bits/random.h (__mod(_Tp)): Use defaults.
        (struct _Mod): Adjust template parameters.
        (linear_congruential_engine<>::operator()()): Adjust.
index c8b6590..e4c3961 100644 (file)
@@ -116,7 +116,7 @@ namespace std
       const _UIntType __k0 = __m == 0 ? std::numeric_limits<_UIntType>::digits
                                      : std::__lg(__m);
       const _UIntType __k = (__k0 + 31) / 32;
-      _UIntType __arr[__k + 3];
+      uint_least32_t __arr[__k + 3];
       __q.generate(__arr + 0, __arr + __k + 3);
       _UIntType __factor = 1u;
       _UIntType __sum = 0u;