diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-30 11:39:58 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-30 11:39:58 +0000 |
commit | 27121718dadc1c9ae171f2b6ed95ab2d610c87b7 (patch) | |
tree | ec6bf83bc929b3be00973cb3f3a43eb911058903 /gcc/ada/s-rannum.adb | |
parent | 7b9b2f05a09e0a5e6085ffdde39e0eb6d5f7d4cf (diff) | |
download | gcc-27121718dadc1c9ae171f2b6ed95ab2d610c87b7.tar.gz |
2012-01-30 Thomas Quinot <quinot@adacore.com>
* s-rannum.adb, s-ransee.adb, s-ransee.ads (Get_Seed): Return
Unsigned_64 rather than Duration.
(System.Random_Numbers.Reset): Use full value of seed
(do not truncate sub-second bits).
2012-01-30 Thomas Quinot <quinot@adacore.com>
* sem_cat.adb, sem_ch12.adb: Minor reformatting.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183708 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-rannum.adb')
-rw-r--r-- | gcc/ada/s-rannum.adb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/ada/s-rannum.adb b/gcc/ada/s-rannum.adb index 4e5e1d55797..ca38408d318 100644 --- a/gcc/ada/s-rannum.adb +++ b/gcc/ada/s-rannum.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2007-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 2007-2012, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -480,12 +480,8 @@ package body System.Random_Numbers is ----------- procedure Reset (Gen : Generator) is - X : constant Unsigned_32 := - Unsigned_32'Mod (Unsigned_64 (Random_Seed.Get_Seed) * 64); - -- Why * 64 ??? - begin - Init (Gen, X); + Init (Gen, Unsigned_32'Mod (Random_Seed.Get_Seed)); end Reset; procedure Reset (Gen : Generator; Initiator : Integer_32) is |