diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-20 14:54:27 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-20 14:54:27 +0200 |
commit | bddd6058a2b9c29980962301b65a911985a3e00d (patch) | |
tree | ecad736fcc71b3ccb622d267bcd774d938e18c8f | |
parent | a3c39f83ee9d05fa4ee14288ce1758eb4bb7f912 (diff) | |
download | gcc-bddd6058a2b9c29980962301b65a911985a3e00d.zip gcc-bddd6058a2b9c29980962301b65a911985a3e00d.tar.gz gcc-bddd6058a2b9c29980962301b65a911985a3e00d.tar.bz2 |
[multiple changes]
2009-04-20 Nicolas Roche <roche@adacore.com>
* sysdep.c (__gnat_localtime_tzoff): on Windows, manipulated times are
unsigned long long. So compare local_time and utc_time before computing
the difference.
2009-04-20 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch3.adb (Build_Derived_Private_Type): Insert the declaration
of the Underlying_Record_View before that of the derived type.
* exp_ch3.adb (Expand_Record_Extension): Do not special-case types
with unknown discriminants with regard to the parent subtype.
From-SVN: r146410
-rw-r--r-- | gcc/ada/ChangeLog | 19 | ||||
-rw-r--r-- | gcc/ada/exp_ch3.adb | 10 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 7 | ||||
-rw-r--r-- | gcc/ada/sysdep.c | 5 |
4 files changed, 25 insertions, 16 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 21b28bb..e49b992 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,22 @@ +2009-04-20 Ed Schonberg <schonberg@adacore.com> + + * sem_ch8.adb (Analyze_Object_Renaming): Proper checks on incorrect + null exclusion qualifiers for object renaming declarations. + +2009-04-20 Nicolas Roche <roche@adacore.com> + + * sysdep.c (__gnat_localtime_tzoff): on Windows, manipulated times are + unsigned long long. So compare local_time and utc_time before computing + the difference. + +2009-04-20 Eric Botcazou <ebotcazou@adacore.com> + + * sem_ch3.adb (Build_Derived_Private_Type): Insert the declaration + of the Underlying_Record_View before that of the derived type. + + * exp_ch3.adb (Expand_Record_Extension): Do not special-case types + with unknown discriminants with regard to the parent subtype. + 2009-04-20 Bob Duff <duff@adacore.com> * sem.adb (Semantics, Walk_Library_Items): Include dependents of bodies diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 8b70aeb..ae7d7a9 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -3892,16 +3892,6 @@ package body Exp_Ch3 is Par_Subtype := Process_Subtype (New_Copy_Tree (Indic), Def); end if; - -- If this is an extension of a type with unknown discriminants, use - -- full view to provide proper discriminants to gigi. - - if Has_Unknown_Discriminants (Par_Subtype) - and then Is_Private_Type (Par_Subtype) - and then Present (Full_View (Par_Subtype)) - then - Par_Subtype := Full_View (Par_Subtype); - end if; - Set_Parent_Subtype (T, Par_Subtype); Comp_Decl := diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 45c483a..db0d12c 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -5557,10 +5557,7 @@ package body Sem_Ch3 is (N, Parent_Type, Derived_Type, Derive_Subps); -- Build anonymous completion, as a derivation from the full - -- view of the parent. Because it is used as a placeholder - -- to convey information to the back-end, it must be declared - -- after the original type so the back-end knows that it needs - -- to disregard the declaration. + -- view of the parent. Decl := Make_Full_Type_Declaration (Loc, @@ -5588,7 +5585,7 @@ package body Sem_Ch3 is Install_Private_Declarations (Par_Scope); Install_Visible_Declarations (Par_Scope); - Insert_After (N, Decl); + Insert_Before (N, Decl); -- Mark entity as an underlying record view before analysis, -- to avoid generating the list of its primitive operations diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index 8a227b4..fd4dfad 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -787,7 +787,10 @@ __gnat_localtime_tzoff (const time_t *timer, long *off) /* An error occurs so return invalid_tzoff. */ *off = __gnat_invalid_tzoff; else - *off = (long) ((local_time.ull_time - utc_time.ull_time) / 10000000ULL); + if (local_time.ull_time > utc_time.ull_time) + *off = (long) ((local_time.ull_time - utc_time.ull_time) / 10000000ULL); + else + *off = - (long) ((utc_time.ull_time - local_time.ull_time) / 10000000ULL); (*Unlock_Task) (); } |