diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-01-07 11:12:03 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-01-07 11:12:03 +0100 |
commit | 1c85591cabcde20a01a2ecb90d857625a5681ae4 (patch) | |
tree | 23660b48f112efe646ffdfa4c8864aa92bdcbc03 /gcc/ada/a-reatim.adb | |
parent | b6e5a1ec2c33cd98e0f3ca4818993a3a00ef05eb (diff) | |
download | gcc-1c85591cabcde20a01a2ecb90d857625a5681ae4.zip gcc-1c85591cabcde20a01a2ecb90d857625a5681ae4.tar.gz gcc-1c85591cabcde20a01a2ecb90d857625a5681ae4.tar.bz2 |
[multiple changes]
2015-01-07 Robert Dewar <dewar@adacore.com>
* a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
exp_ch3.adb: Minor reformatting.
2015-01-07 Doug Rupp <rupp@adacore.com>
* s-linux.ads (clockid_t): New subtype.
* s-osinte-linux.ads (pragma Linker Options): Add -lrt.
(clockid_t): New subtype.
(clock_getres): Import system call.
* s-taprop-linux.adb (System.OS_Constants): With and rename.
(RT_Resolution): Remove
hardcoded value and call clock_getres.
* s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
2015-01-07 Robert Dewar <dewar@adacore.com>
* sem_warn.adb (Check_One_Unit): Guard against context item
with no Entity field.
From-SVN: r219289
Diffstat (limited to 'gcc/ada/a-reatim.adb')
-rw-r--r-- | gcc/ada/a-reatim.adb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/ada/a-reatim.adb b/gcc/ada/a-reatim.adb index 1a233c4..4597dc3 100644 --- a/gcc/ada/a-reatim.adb +++ b/gcc/ada/a-reatim.adb @@ -222,8 +222,8 @@ package body Ada.Real_Time is -- the intermediate result Time (SC) we take advantage of the different -- signs in SC and TS (when that is the case). - -- If signs of SC and TS are different then we avoid converting SC to - -- Time (as we do in the else part). The reason for that is that SC + -- If the signs of SC and TS are different then we avoid converting SC + -- to Time (as we do in the else part). The reason for that is that SC -- converted to Time may overflow the range of Time, while the addition -- of SC plus TS does not overflow (because of their different signs). -- The approach is to add and remove the greatest value of time @@ -231,9 +231,7 @@ package body Ada.Real_Time is -- signs, so we add the positive constant to the negative value, and the -- negative constant to the positive value, to prevent overflows. - if (SC > 0 and then TS < 0.0) - or else (SC < 0 and then TS > 0.0) - then + if (SC > 0 and then TS < 0.0) or else (SC < 0 and then TS > 0.0) then declare Closest_Boundary : constant Seconds_Count := (if TS >= 0.0 then |