diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/a-calend.adb | 7 | ||||
-rw-r--r-- | gcc/ada/a-calend.ads | 31 | ||||
-rw-r--r-- | gcc/ada/a-catizo.ads | 2 | ||||
-rw-r--r-- | gcc/ada/par-ch13.adb | 3 |
5 files changed, 40 insertions, 8 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 511afc0..edc4dc4 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2012-01-23 Robert Dewar <dewar@adacore.com> + + * a-catizo.ads, a-calend.adb, a-calend.ads, par-ch13.adb: Minor + reformatting. + 2012-01-23 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Subprogram_Declaration): Do not set the diff --git a/gcc/ada/a-calend.adb b/gcc/ada/a-calend.adb index 731c4ed..d85eb2c 100644 --- a/gcc/ada/a-calend.adb +++ b/gcc/ada/a-calend.adb @@ -30,7 +30,9 @@ ------------------------------------------------------------------------------ with Ada.Unchecked_Conversion; + with Interfaces.C; + with System.OS_Primitives; package body Ada.Calendar is @@ -115,11 +117,12 @@ package body Ada.Calendar is -- This routine acts as an Ada wrapper around __gnat_localtime_tzoff which -- in turn utilizes various OS-dependent mechanisms to calculate the time -- zone offset of a date. Formal parameter Date represents an arbitrary - -- time stamp, either in the past, now, or in the future. If flag + -- time stamp, either in the past, now, or in the future. If the flag -- Is_Historic is set, this routine would try to calculate to the best of -- the OS's abilities the time zone offset that was or will be in effect -- on Date. If the flag is set to False, the routine returns the current -- time zone with Date effectively set to Clock. + -- -- NOTE: Targets which support localtime_r will aways return a historic -- time zone even if flag Is_Historic is set to False because this is how -- localtime_r operates. @@ -191,7 +194,7 @@ package body Ada.Calendar is Unix_Min : constant Time_Rep := Ada_Low + Time_Rep (17 * 366 + 52 * 365) * Nanos_In_Day; - -- The Unix upper time bound expressed as nonoseconds since the start of + -- The Unix upper time bound expressed as nanoseconds since the start of -- Ada time in UTC. Unix_Max : constant Time_Rep := diff --git a/gcc/ada/a-calend.ads b/gcc/ada/a-calend.ads index 6178019..9e08c79 100644 --- a/gcc/ada/a-calend.ads +++ b/gcc/ada/a-calend.ads @@ -193,6 +193,35 @@ private -- of year - 4 to year + 4. Internally, routines Split and Time_Of add or -- subtract a "fake" February 29 to facilitate the arithmetic involved. + ------------------------------------ + -- Time zones and UTC_Time_Offset -- + ------------------------------------ + + -- The implementation-defined time zone of Ada.Calendar routines is the + -- local time zone. The term "local time zone" can be interpreted in two + -- different ways - either the offset from UTC of the "now" or the offset + -- from UTC of some input date. + + -- For efficency reasons, Split and Time_Of take the first approach. Since + -- the Ada Reference Manual does not mandate that Split and Time_Of should + -- be concious of historic time zones, this interpretation is acceptable + -- and efficent in terms of performance. Split and Time_Of localize their + -- respective input regardless of whether it represent a past or a future + -- date. + + -- UTC_Time_Offset on the other hand must be knowledgeable of historic time + -- zones. To achieve this, the implementation relies on various operating + -- system routines. Note that not all operating systems support time zones. + -- UTC_Time_Offset calculates the offset from UTC as it occurred or will + -- occur on the input date relative to the local time zone. Example: + + -- Date Offset Reason + -- 2012-01-11 -300 + -- 2011-03-12 -300 + -- 2011-03-14 -240 Daylight savings is in effect + + -- Local declarations + -- The underlying type of Time has been chosen to be a 64 bit signed -- integer number since it allows for easier processing of sub seconds -- and arithmetic. @@ -351,7 +380,7 @@ private package Time_Zones_Operations is function UTC_Time_Offset (Date : Time) return Long_Integer; - -- Return (in seconds), the difference between the local time zone and + -- Return (in seconds) the difference between the local time zone and -- UTC time at a specific historic date. end Time_Zones_Operations; diff --git a/gcc/ada/a-catizo.ads b/gcc/ada/a-catizo.ads index feb0402..5f55869 100644 --- a/gcc/ada/a-catizo.ads +++ b/gcc/ada/a-catizo.ads @@ -6,8 +6,6 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2005-2012, Free Software Foundation, Inc. -- --- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- -- copy and modify this specification, provided that if you redistribute a -- diff --git a/gcc/ada/par-ch13.adb b/gcc/ada/par-ch13.adb index 107426f..9526e32 100644 --- a/gcc/ada/par-ch13.adb +++ b/gcc/ada/par-ch13.adb @@ -514,14 +514,11 @@ package body Ch13 is if Token = Tok_Comma or else Token = Tok_Semicolon - then - -- or else (not Semicolon and then Token /= Tok_Arrow) if Aspect_Argument (A_Id) /= Optional then Error_Msg_Node_1 := Identifier (Aspect); Error_Msg_AP ("aspect& requires an aspect definition"); OK := False; - end if; elsif not Semicolon and then Token /= Tok_Arrow then |