Commit dd3e1ff5 by Arnaud Charlet

[multiple changes]

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.

From-SVN: r148898
parent 0386aad1
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> 2009-06-24 Eric Botcazou <ebotcazou@adacore.com>
* ttypes.ads: Minor editing. * ttypes.ads: Minor editing.
......
...@@ -1182,7 +1182,6 @@ package body Exp_Ch6 is ...@@ -1182,7 +1182,6 @@ package body Exp_Ch6 is
Expression => Expr)); Expression => Expr));
end; end;
end if; end if;
end Add_Call_By_Copy_Code; end Add_Call_By_Copy_Code;
---------------------------------- ----------------------------------
......
...@@ -3055,8 +3055,9 @@ package body Layout is ...@@ -3055,8 +3055,9 @@ package body Layout is
-- the type, or the maximum allowed alignment. -- the type, or the maximum allowed alignment.
declare declare
S : constant Int := UI_To_Int (Esize (E)) / SSU; S : constant Int := UI_To_Int (Esize (E)) / SSU;
Max_Alignment, A : Nat; A : Nat;
Max_Alignment : Nat;
begin begin
-- If the default alignment of "double" floating-point types is -- If the default alignment of "double" floating-point types is
......
...@@ -5885,16 +5885,18 @@ package body Make is ...@@ -5885,16 +5885,18 @@ package body Make is
-- executable: there may be an externally built library -- executable: there may be an externally built library
-- file that has been modified. -- file that has been modified.
if (not Executable_Obsolete) if not Executable_Obsolete
and then Main_Project /= No_Project and then Main_Project /= No_Project
then then
declare declare
Proj1 : Project_List; Proj1 : Project_List;
begin begin
Proj1 := Project_Tree.Projects; Proj1 := Project_Tree.Projects;
while Proj1 /= null loop while Proj1 /= null loop
if Proj1.Project.Library and then if Proj1.Project.Library
Proj1.Project.Library_TS > Executable_Stamp and then
Proj1.Project.Library_TS > Executable_Stamp
then then
Executable_Obsolete := True; Executable_Obsolete := True;
Youngest_Obj_Stamp := Proj1.Project.Library_TS; Youngest_Obj_Stamp := Proj1.Project.Library_TS;
......
...@@ -112,8 +112,9 @@ package body Sem_Ch10 is ...@@ -112,8 +112,9 @@ package body Sem_Ch10 is
(C_Unit : Node_Id; (C_Unit : Node_Id;
Pack : Entity_Id; Pack : Entity_Id;
Is_Limited : Boolean := False) return Boolean; Is_Limited : Boolean := False) return Boolean;
-- Determine whether compilation unit C_Unit contains a with clause for -- Determine whether compilation unit C_Unit contains a [limited] with
-- package Pack. Use flag Is_Limited to designate desired clause kind. -- 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); 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 -- If the main unit is a child unit, implicit withs are also added for
...@@ -2819,30 +2820,34 @@ package body Sem_Ch10 is ...@@ -2819,30 +2820,34 @@ package body Sem_Ch10 is
Is_Limited : Boolean := False) return Boolean Is_Limited : Boolean := False) return Boolean
is is
Item : Node_Id; 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 begin
if Present (Context_Items (C_Unit)) then if Present (Context_Items (C_Unit)) then
Item := First (Context_Items (C_Unit)); Item := First (Context_Items (C_Unit));
while Present (Item) loop while Present (Item) loop
if Nkind (Item) = N_With_Clause then if Nkind (Item) = N_With_Clause
and then Limited_Present (Item) = Is_Limited
-- Retrieve the entity of the imported compilation unit and then Named_Unit (Item) = Pack
then
if Nkind (Name (Item)) = N_Selected_Component then return True;
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;
end if; end if;
Next (Item); Next (Item);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment