diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-04-26 12:03:51 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-04-26 12:03:51 +0200 |
commit | d99ff0f407dadb7b1e576416c5de4dce43151222 (patch) | |
tree | 20024bd520d431dd71ac643a761e5474d7c9b85b /gcc/ada/a-calend.adb | |
parent | f146302c2594902c5584bdf9ea25c57979e4cb1c (diff) | |
download | gcc-d99ff0f407dadb7b1e576416c5de4dce43151222.zip gcc-d99ff0f407dadb7b1e576416c5de4dce43151222.tar.gz gcc-d99ff0f407dadb7b1e576416c5de4dce43151222.tar.bz2 |
[multiple changes]
2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch5.adb (Analyze_Loop_Parameter_Specification): Do not freeze
the loop variable while preanalyzing a quantified expression.
2012-04-26 Hristian Kirtchev <kirtchev@adacore.com>
* a-calend.adb (Split, Time_Of): Rename parameter Is_Ada_05
to Use_TZ to better illustrate its function. Update all
references to the parameter.
(To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
* a-calend.ads (Split, Time_Of): Rename parameter Is_Ada_05
to Use_TZ to better illustrate its function. Update the related
comment on usage.
* a-calend-vms.adb (Split, Time_Of): Rename parameter
Is_Ada_05 to Use_TZ to better illustrate its function. Update
all references to the parameter.
(To_Ada_Time): Update the call to Formatting_Operations.Time_Of.
* a-calend-vms.ads (Split, Time_Of): Rename parameter Is_Ada_05
to Use_TZ to better illustrate its function. Update the related
comment on usage.
* a-calfor.adb (Split, Time_Of): Update the call to
Formatting_Operations.Time_Of.
* sysdep.c (__gnat_localtime_tzoff): Dereference pointer
"is_historic" and rewrite the check as a comparison. Add a
comment on flag values.
2012-04-26 Robert Dewar <dewar@adacore.com>
* exp_ch2.adb, sem_ch8.adb: Minor reformatting.
2012-04-26 Vasiliy Fofanov <fofanov@adacore.com>
* a-stzunb-shared.adb, gnat_ugn.texi, a-strunb-shared.adb,
a-strunb-shared.ads, uintp.adb, a-stwiun-shared.adb,
a-stwiun-shared.ads, a-cbhama.ads, vms_data.ads, a-cobove.adb,
a-convec.adb, sem_ch13.adb, a-cbhase.ads: Fix common misuses of the
word "then" where "than" should be used in English.
From-SVN: r186871
Diffstat (limited to 'gcc/ada/a-calend.adb')
-rw-r--r-- | gcc/ada/a-calend.adb | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/gcc/ada/a-calend.adb b/gcc/ada/a-calend.adb index f79b9d1..94257c2 100644 --- a/gcc/ada/a-calend.adb +++ b/gcc/ada/a-calend.adb @@ -575,7 +575,7 @@ package body Ada.Calendar is pragma Unreferenced (H, M, Se, Ss, Le); begin - -- Even though the input time zone is UTC (0), the flag Is_Ada_05 will + -- Even though the input time zone is UTC (0), the flag Use_TZ will -- ensure that Split picks up the local time zone. Formatting_Operations.Split @@ -589,7 +589,7 @@ package body Ada.Calendar is Second => Se, Sub_Sec => Ss, Leap_Sec => Le, - Is_Ada_05 => False, + Use_TZ => False, Time_Zone => 0); -- Validity checks @@ -633,7 +633,7 @@ package body Ada.Calendar is raise Time_Error; end if; - -- Even though the input time zone is UTC (0), the flag Is_Ada_05 will + -- Even though the input time zone is UTC (0), the flag Use_TZ will -- ensure that Split picks up the local time zone. return @@ -648,7 +648,7 @@ package body Ada.Calendar is Sub_Sec => Ss, Leap_Sec => False, Use_Day_Secs => True, - Is_Ada_05 => False, + Use_TZ => False, Time_Zone => 0); end Time_Of; @@ -744,7 +744,8 @@ package body Ada.Calendar is Secs_T := time_t (Date_N / Nano); - -- Determine whether to treat the input date as historical or not + -- Determine whether to treat the input date as historical or not. A + -- value of "0" signifies that the date is NOT historic. Flag := (if Is_Historic then 1 else 0); @@ -975,7 +976,7 @@ package body Ada.Calendar is Sub_Sec => 0.0, -- No precise sub second given Leap_Sec => Leap, Use_Day_Secs => False, -- Time is given in h:m:s - Is_Ada_05 => True, -- Force usage of explicit time zone + Use_TZ => True, -- Force usage of explicit time zone Time_Zone => 0)); -- Place the value in UTC -- Step 4: Daylight Savings Time @@ -1204,7 +1205,7 @@ package body Ada.Calendar is Second : out Integer; Sub_Sec : out Duration; Leap_Sec : out Boolean; - Is_Ada_05 : Boolean; + Use_TZ : Boolean; Time_Zone : Long_Integer) is -- The following constants represent the number of nanoseconds @@ -1257,7 +1258,7 @@ package body Ada.Calendar is -- Step 2: Time zone processing. This action converts the input date -- from GMT to the requested time zone. Applies from Ada 2005 on. - if Is_Ada_05 then + if Use_TZ then if Time_Zone /= 0 then Date_N := Date_N + Time_Rep (Time_Zone) * 60 * Nano; end if; @@ -1385,7 +1386,7 @@ package body Ada.Calendar is Sub_Sec : Duration; Leap_Sec : Boolean := False; Use_Day_Secs : Boolean := False; - Is_Ada_05 : Boolean := False; + Use_TZ : Boolean := False; Time_Zone : Long_Integer := 0) return Time is Count : Integer; @@ -1479,7 +1480,7 @@ package body Ada.Calendar is -- a uniform representation which can be treated by arithmetic -- operations for instance without any additional corrections. - if Is_Ada_05 then + if Use_TZ then if Time_Zone /= 0 then Res_N := Res_N - Time_Rep (Time_Zone) * 60 * Nano; end if; @@ -1519,7 +1520,7 @@ package body Ada.Calendar is Rounded_Res_N := Res_N - (Res_N mod Nano); - if Is_Ada_05 + if Use_TZ and then Leap_Sec and then Rounded_Res_N /= Next_Leap_N then |