summaryrefslogtreecommitdiff
path: root/gcc/ada/a-calfor.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 12:30:25 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 12:30:25 +0000
commit8713f96dad5ccc6f38dd5d3ae8342b6fd4a1bd77 (patch)
treeaeac84e846faee6687e9981c8ff36e2387111a9e /gcc/ada/a-calfor.adb
parent23a5bb7280291cec91d30adc15e091aaa7f280a4 (diff)
downloadgcc-8713f96dad5ccc6f38dd5d3ae8342b6fd4a1bd77.tar.gz
2009-04-20 Ed Schonberg <schonberg@adacore.com>
* rtsfind.adb (RTE, RTE_Record_Component): In Configurable_Run_Time_Mode, do not enable front-end inlining. 2009-04-20 Thomas Quinot <quinot@adacore.com> * g-socthi-vms.adb: Remove now unnecessary WITH clause on System.Address_To_Access_Conversions. 2009-04-20 Ed Schonberg <schonberg@adacore.com> * sem.adb: Guard against ill-formed subunits. 2009-04-20 Hristian Kirtchev <kirtchev@adacore.com> * a-calfor.adb (Image): Subtract 0.5 from the sub second component only when it is positive. This avoids a potential constraint error raised by the conversion to Natural. 2009-04-20 Thomas Quinot <quinot@adacore.com> * einfo.ads: Minor comment rewording * sem_aggr.adb: Minor comment rewording * sem_ch3.adb, sem_ch6.adb: Minor reformatting 2009-04-20 Pascal Obry <obry@adacore.com> * adaint.c (__gnat_is_readable_file): Check for file existence when not using ACL (always the case on remote drives). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146405 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-calfor.adb')
-rw-r--r--gcc/ada/a-calfor.adb14
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ada/a-calfor.adb b/gcc/ada/a-calfor.adb
index 83d9cdc736b..10e9617022c 100644
--- a/gcc/ada/a-calfor.adb
+++ b/gcc/ada/a-calfor.adb
@@ -170,7 +170,12 @@ package body Ada.Calendar.Formatting is
-- Prevent rounding when converting to natural
- Sub_Second := Sub_Second * 100.0 - 0.5;
+ Sub_Second := Sub_Second * 100.0;
+
+ if Sub_Second > 0.0 then
+ Sub_Second := Sub_Second - 0.5;
+ end if;
+
SS_Nat := Natural (Sub_Second);
declare
@@ -249,7 +254,12 @@ package body Ada.Calendar.Formatting is
-- Prevent rounding when converting to natural
- Sub_Second := Sub_Second * 100.0 - 0.5;
+ Sub_Second := Sub_Second * 100.0;
+
+ if Sub_Second > 0.0 then
+ Sub_Second := Sub_Second - 0.5;
+ end if;
+
SS_Nat := Natural (Sub_Second);
declare