Commit 5568b57c by Arnaud Charlet

[multiple changes]

2009-08-17  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch3.adb (Build_Discriminant_Formals): If the discriminals already
	exist, as is the case for synchronized types, use the type of the
	discriminal in the parameter specification, to prevent a spurious
	subtype mismatch in gigi.

2009-08-17  Robert Dewar  <dewar@adacore.com>

	* prj-env.adb: Minor reformatting
	* make.adb: Minor reformatting
	Comment updates

2009-08-17  Javier Miranda  <miranda@adacore.com>

	* exp_ch7.adb (Wrap_Transient_Expression): Update comments.

From-SVN: r150828
parent 48eff283
2009-08-17 Ed Schonberg <schonberg@adacore.com>
* exp_ch3.adb (Build_Discriminant_Formals): If the discriminals already
exist, as is the case for synchronized types, use the type of the
discriminal in the parameter specification, to prevent a spurious
subtype mismatch in gigi.
2009-08-17 Robert Dewar <dewar@adacore.com>
* prj-env.adb: Minor reformatting
* make.adb: Minor reformatting
Comment updates
2009-08-17 Javier Miranda <miranda@adacore.com>
* exp_ch7.adb (Wrap_Transient_Expression): Update comments.
2009-08-17 Emmanuel Briot <briot@adacore.com>
* prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-conf.adb
(Processing_Flags.Require_Obj_Dirs): new field, which controls whether
object directories must be present. In the case of gprclean at least,
these are optional (if they do not exist there is nothing to clean)
2009-08-17 Robert Dewar <dewar@adacore.com> 2009-08-17 Robert Dewar <dewar@adacore.com>
* prj-env.adb: Minor reformatting * prj-env.adb: Minor reformatting
......
...@@ -95,10 +95,11 @@ package body Exp_Ch3 is ...@@ -95,10 +95,11 @@ package body Exp_Ch3 is
(Rec_Id : Entity_Id; (Rec_Id : Entity_Id;
Use_Dl : Boolean) return List_Id; Use_Dl : Boolean) return List_Id;
-- This function uses the discriminants of a type to build a list of -- This function uses the discriminants of a type to build a list of
-- formal parameters, used in the following function. If the flag Use_Dl -- formal parameters, used in Build_Init_Procedure among other places.
-- is set, the list is built using the already defined discriminals -- If the flag Use_Dl is set, the list is built using the already
-- of the type. Otherwise new identifiers are created, with the source -- defined discriminals of the type, as is the case for concurrent
-- names of the discriminants. -- types with discriminants. Otherwise new identifiers are created,
-- with the source names of the discriminants.
function Build_Equivalent_Array_Aggregate (T : Entity_Id) return Node_Id; function Build_Equivalent_Array_Aggregate (T : Entity_Id) return Node_Id;
-- This function builds a static aggregate that can serve as the initial -- This function builds a static aggregate that can serve as the initial
...@@ -1141,6 +1142,7 @@ package body Exp_Ch3 is ...@@ -1141,6 +1142,7 @@ package body Exp_Ch3 is
Parameter_List : constant List_Id := New_List; Parameter_List : constant List_Id := New_List;
D : Entity_Id; D : Entity_Id;
Formal : Entity_Id; Formal : Entity_Id;
Formal_Type : Entity_Id;
Param_Spec_Node : Node_Id; Param_Spec_Node : Node_Id;
begin begin
...@@ -1151,15 +1153,17 @@ package body Exp_Ch3 is ...@@ -1151,15 +1153,17 @@ package body Exp_Ch3 is
if Use_Dl then if Use_Dl then
Formal := Discriminal (D); Formal := Discriminal (D);
Formal_Type := Etype (Formal);
else else
Formal := Make_Defining_Identifier (Loc, Chars (D)); Formal := Make_Defining_Identifier (Loc, Chars (D));
Formal_Type := Etype (D);
end if; end if;
Param_Spec_Node := Param_Spec_Node :=
Make_Parameter_Specification (Loc, Make_Parameter_Specification (Loc,
Defining_Identifier => Formal, Defining_Identifier => Formal,
Parameter_Type => Parameter_Type =>
New_Reference_To (Etype (D), Loc)); New_Reference_To (Formal_Type, Loc));
Append (Param_Spec_Node, Parameter_List); Append (Param_Spec_Node, Parameter_List);
Next_Discriminant (D); Next_Discriminant (D);
end loop; end loop;
......
...@@ -3554,9 +3554,7 @@ package body Exp_Ch7 is ...@@ -3554,9 +3554,7 @@ package body Exp_Ch7 is
Loc : constant Source_Ptr := Sloc (N); Loc : constant Source_Ptr := Sloc (N);
E : constant Entity_Id := Make_Temporary (Loc, 'E', N); E : constant Entity_Id := Make_Temporary (Loc, 'E', N);
Etyp : constant Entity_Id := Etype (N); Etyp : constant Entity_Id := Etype (N);
Expr : constant Node_Id := Relocate_Node (N);
Expr : constant Node_Id := Relocate_Node (N);
-- Capture this node because the call to Adjust_SCIL_Node can ???
begin begin
-- If the relocated node is a function call then check if some SCIL -- If the relocated node is a function call then check if some SCIL
......
...@@ -645,7 +645,7 @@ package body Make is ...@@ -645,7 +645,7 @@ package body Make is
-- the fact that this ALI file is read-only. -- the fact that this ALI file is read-only.
procedure Process_Multilib; procedure Process_Multilib;
-- Add appropriate --RTS argument to handle multilib. -- Add appropriate --RTS argument to handle multilib
---------------------------------------------------- ----------------------------------------------------
-- Compiler, Binder & Linker Data and Subprograms -- -- Compiler, Binder & Linker Data and Subprograms --
...@@ -7304,7 +7304,6 @@ package body Make is ...@@ -7304,7 +7304,6 @@ package body Make is
---------------------- ----------------------
procedure Process_Multilib is procedure Process_Multilib is
Output_FD : File_Descriptor; Output_FD : File_Descriptor;
Output_Name : String_Access; Output_Name : String_Access;
Arg_Index : Natural := 0; Arg_Index : Natural := 0;
...@@ -7331,7 +7330,6 @@ package body Make is ...@@ -7331,7 +7330,6 @@ package body Make is
Arg_Index := Arg_Index + 1; Arg_Index := Arg_Index + 1;
Args (Arg_Index) := new String'(Argv); Args (Arg_Index) := new String'(Argv);
end if; end if;
end; end;
end loop; end loop;
...@@ -7345,22 +7343,24 @@ package body Make is ...@@ -7345,22 +7343,24 @@ package body Make is
Multilib_Gcc := Gcc; Multilib_Gcc := Gcc;
end if; end if;
Multilib_Gcc_Path := Multilib_Gcc_Path := GNAT.OS_Lib.Locate_Exec_On_Path (Multilib_Gcc.all);
GNAT.OS_Lib.Locate_Exec_On_Path (Multilib_Gcc.all);
Create_Temp_File (Output_FD, Output_Name); Create_Temp_File (Output_FD, Output_Name);
if Output_FD = Invalid_FD then if Output_FD = Invalid_FD then
return; return;
end if; end if;
GNAT.OS_Lib.Spawn (Multilib_Gcc_Path.all, Args, Output_FD, GNAT.OS_Lib.Spawn
Return_Code, False); (Multilib_Gcc_Path.all, Args, Output_FD, Return_Code, False);
Close (Output_FD); Close (Output_FD);
if Return_Code /= 0 then if Return_Code /= 0 then
return; return;
end if; end if;
Output_FD := Open_Read (Output_Name.all, Binary); Output_FD := Open_Read (Output_Name.all, Binary);
if Output_FD = Invalid_FD then if Output_FD = Invalid_FD then
return; return;
end if; end if;
...@@ -7382,9 +7382,7 @@ package body Make is ...@@ -7382,9 +7382,7 @@ package body Make is
end if; end if;
Scan_Make_Arg ("-margs", And_Save => True); Scan_Make_Arg ("-margs", And_Save => True);
Scan_Make_Arg ("--RTS=" & Line (1 .. N_Read), Scan_Make_Arg ("--RTS=" & Line (1 .. N_Read), And_Save => True);
And_Save => True);
end Process_Multilib; end Process_Multilib;
----------------------------- -----------------------------
...@@ -7396,6 +7394,7 @@ package body Make is ...@@ -7396,6 +7394,7 @@ package body Make is
Seen : Project_Boolean_Htable.Instance := Project_Boolean_Htable.Nil; Seen : Project_Boolean_Htable.Instance := Project_Boolean_Htable.Nil;
procedure Recurse (Prj : Project_Id; Depth : Natural); procedure Recurse (Prj : Project_Id; Depth : Natural);
-- Recursive procedure that does the work, keeping track of the depth
------------- -------------
-- Recurse -- -- Recurse --
......
...@@ -222,8 +222,6 @@ package body Prj.Env is ...@@ -222,8 +222,6 @@ package body Prj.Env is
-- Add_To_Buffer -- -- Add_To_Buffer --
------------------- -------------------
-- Wouldn't it be more consistent to use a Table for Buffer ???
procedure Add_To_Buffer procedure Add_To_Buffer
(S : String; (S : String;
Buffer : in out String_Access; Buffer : in out String_Access;
...@@ -236,7 +234,6 @@ package body Prj.Env is ...@@ -236,7 +234,6 @@ package body Prj.Env is
declare declare
New_Buffer : constant String_Access := New_Buffer : constant String_Access :=
new String (1 .. 2 * Buffer'Last); new String (1 .. 2 * Buffer'Last);
begin begin
New_Buffer (1 .. Buffer_Last) := Buffer (1 .. Buffer_Last); New_Buffer (1 .. Buffer_Last) := Buffer (1 .. Buffer_Last);
Free (Buffer); Free (Buffer);
......
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