diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-24 09:11:43 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-24 09:11:43 +0000 |
commit | 45cedf2ed41b5c0b4c28fb5d8105f38339277c0b (patch) | |
tree | c0fd9d73501cb1aff6eb977d385a6853104cabf1 /gcc/ada | |
parent | 09001c4f0b2d79bba0028262f4691bbcb3ac5403 (diff) | |
download | gcc-45cedf2ed41b5c0b4c28fb5d8105f38339277c0b.tar.gz |
2009-06-24 Robert Dewar <dewar@adacore.com>
* exp_ch6.adb: Minor reformatting
* layout.adb: Minor reformatting
* make.adb: Minor reformatting
2009-06-24 Thomas Quinot <quinot@adacore.com>
* sem_ch10.adb: Minor code reorganization.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148898 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/ada/exp_ch6.adb | 1 | ||||
-rw-r--r-- | gcc/ada/layout.adb | 5 | ||||
-rw-r--r-- | gcc/ada/make.adb | 10 | ||||
-rw-r--r-- | gcc/ada/sem_ch10.adb | 47 |
5 files changed, 47 insertions, 28 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 4f9fb6de066..4905f7f6a57 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,15 @@ +2009-06-24 Robert Dewar <dewar@adacore.com> + + * exp_ch6.adb: Minor reformatting + + * layout.adb: Minor reformatting + + * make.adb: Minor reformatting + +2009-06-24 Thomas Quinot <quinot@adacore.com> + + * sem_ch10.adb: Minor code reorganization. + 2009-06-24 Eric Botcazou <ebotcazou@adacore.com> * ttypes.ads: Minor editing. diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index c3947305b31..011472de5a2 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -1182,7 +1182,6 @@ package body Exp_Ch6 is Expression => Expr)); end; end if; - end Add_Call_By_Copy_Code; ---------------------------------- diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb index 6cce7b91e60..69772d69290 100644 --- a/gcc/ada/layout.adb +++ b/gcc/ada/layout.adb @@ -3055,8 +3055,9 @@ package body Layout is -- the type, or the maximum allowed alignment. declare - S : constant Int := UI_To_Int (Esize (E)) / SSU; - Max_Alignment, A : Nat; + S : constant Int := UI_To_Int (Esize (E)) / SSU; + A : Nat; + Max_Alignment : Nat; begin -- If the default alignment of "double" floating-point types is diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb index 27489cdf99f..d1bfec91448 100644 --- a/gcc/ada/make.adb +++ b/gcc/ada/make.adb @@ -5885,16 +5885,18 @@ package body Make is -- executable: there may be an externally built library -- file that has been modified. - if (not Executable_Obsolete) - and then Main_Project /= No_Project + if not Executable_Obsolete + and then Main_Project /= No_Project then declare Proj1 : Project_List; + begin Proj1 := Project_Tree.Projects; while Proj1 /= null loop - if Proj1.Project.Library and then - Proj1.Project.Library_TS > Executable_Stamp + if Proj1.Project.Library + and then + Proj1.Project.Library_TS > Executable_Stamp then Executable_Obsolete := True; Youngest_Obj_Stamp := Proj1.Project.Library_TS; diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb index 6e7789914cb..da4f993c857 100644 --- a/gcc/ada/sem_ch10.adb +++ b/gcc/ada/sem_ch10.adb @@ -112,8 +112,9 @@ package body Sem_Ch10 is (C_Unit : Node_Id; Pack : Entity_Id; Is_Limited : Boolean := False) return Boolean; - -- Determine whether compilation unit C_Unit contains a with clause for - -- package Pack. Use flag Is_Limited to designate desired clause kind. + -- Determine whether compilation unit C_Unit contains a [limited] with + -- clause for package Pack. Use the flag Is_Limited to designate desired + -- clause kind. procedure Implicit_With_On_Parent (Child_Unit : Node_Id; N : Node_Id); -- If the main unit is a child unit, implicit withs are also added for @@ -2819,30 +2820,34 @@ package body Sem_Ch10 is Is_Limited : Boolean := False) return Boolean is Item : Node_Id; - Nam : Entity_Id; + + function Named_Unit (Clause : Node_Id) return Entity_Id; + -- Return the entity for the unit named in a [limited] with clause + + ---------------- + -- Named_Unit -- + ---------------- + + function Named_Unit (Clause : Node_Id) return Entity_Id is + begin + if Nkind (Name (Clause)) = N_Selected_Component then + return Entity (Selector_Name (Name (Clause))); + else + return Entity (Name (Clause)); + end if; + end Named_Unit; + + -- Start of processing for Has_With_Clause begin if Present (Context_Items (C_Unit)) then Item := First (Context_Items (C_Unit)); while Present (Item) loop - if Nkind (Item) = N_With_Clause then - - -- Retrieve the entity of the imported compilation unit - - if Nkind (Name (Item)) = N_Selected_Component then - Nam := Entity (Selector_Name (Name (Item))); - else - Nam := Entity (Name (Item)); - end if; - - if Nam = Pack - and then - ((Is_Limited and then Limited_Present (Item)) - or else - (not Is_Limited and then not Limited_Present (Item))) - then - return True; - end if; + if Nkind (Item) = N_With_Clause + and then Limited_Present (Item) = Is_Limited + and then Named_Unit (Item) = Pack + then + return True; end if; Next (Item); |