diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-01-23 09:55:13 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-01-23 09:55:13 +0100 |
commit | b3aa0ca8345ecadca2f3482bc78074b634557164 (patch) | |
tree | 9005c3751c02616edac5d5ea549551890eb04451 /gcc/ada/a-catizo.adb | |
parent | 3ffd18f16ccb5256aaf5d8e6a55fc8ad2d521085 (diff) | |
download | gcc-b3aa0ca8345ecadca2f3482bc78074b634557164.zip gcc-b3aa0ca8345ecadca2f3482bc78074b634557164.tar.gz gcc-b3aa0ca8345ecadca2f3482bc78074b634557164.tar.bz2 |
[multiple changes]
2012-01-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Declaration): Do not set the
Corresponding_Body on a defaulted null formal subprogram.
* sem_ch12.adb (Check_Formal_Package_Instance): No check needed
on a defaulted formal subprogram that is a null procedure.
2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch9.adb: Update the comments involving pragma Implemented.
* sem_ch3.adb (Check_Pragma_Implemented (Entity_Id)): Add local
constant Subp_Alias and local variable Impl_Subp. Properly
handle aliases of synchronized wrappers. Code cleanup.
(Check_Pragma_Implemented (Entity_Id; Entity_Id)): Add
Name_Optional as part of the condition.
* sem_prag.adb (Analyze_Pragma): Add "Optional" as one of the
valid choices of implementation kind.
(Check_Arg_Is_One_Of): New routine.
* snames.ads-tmlp: Add Name_Optional.
2012-01-23 Ed Schonberg <schonberg@adacore.com>
* par-ch13.adb: Better error recovery in illegal aspect
specification.
2012-01-23 Hristian Kirtchev <kirtchev@adacore.com>
* a-calend.adb: Add with clause for Interfaces.C. Add constant
Unix_Max.
(Day_Of_Week): Call the internal UTC_Time_Offset.
(Split): Call the internal UTC_Time_Offset.
(Time_Of): Call the internal UTC_Time_Offset.
(Time_Zone_Operations.UTC_Time_Offset): Call internal UTC_Time_Offset.
(UTC_Time_Offset): New library-level routine.
* a-calend.ads (UTC_Time_Offset): Remove parameter
Is_Historic. Update related comment on usage.
* a-catizo.adb (UTC_Time_Offset): Removed.
(UTC_Time_Offset (Time)): Call Time_Zone_Operations.UTC_Time_Offset.
* a-caltizo.ads (UTC_Time_Offset): Removed.
(UTC_Time_Offset (Time)): Add back the default expression of parameter
Date.
From-SVN: r183414
Diffstat (limited to 'gcc/ada/a-catizo.adb')
-rw-r--r-- | gcc/ada/a-catizo.adb | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/gcc/ada/a-catizo.adb b/gcc/ada/a-catizo.adb index b8f74b3..a0eb02d 100644 --- a/gcc/ada/a-catizo.adb +++ b/gcc/ada/a-catizo.adb @@ -42,41 +42,9 @@ package body Ada.Calendar.Time_Zones is -- UTC_Time_Offset -- --------------------- - function UTC_Time_Offset return Time_Offset is + function UTC_Time_Offset (Date : Time := Clock) return Time_Offset is Offset_L : constant Long_Integer := - Time_Zones_Operations.UTC_Time_Offset - (Date => Clock, - Is_Historic => False); - Offset : Time_Offset; - - begin - if Offset_L = Invalid_Time_Zone_Offset then - raise Unknown_Zone_Error; - end if; - - -- The offset returned by Time_Zones_Operations.UTC_Time_Offset is in - -- seconds, the returned value needs to be in minutes. - - Offset := Time_Offset (Offset_L / 60); - - -- Validity checks - - if not Offset'Valid then - raise Unknown_Zone_Error; - end if; - - return Offset; - end UTC_Time_Offset; - - --------------------- - -- UTC_Time_Offset -- - --------------------- - - function UTC_Time_Offset (Date : Time) return Time_Offset is - Offset_L : constant Long_Integer := - Time_Zones_Operations.UTC_Time_Offset - (Date => Date, - Is_Historic => True); + Time_Zones_Operations.UTC_Time_Offset (Date); Offset : Time_Offset; begin |