[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
This commit is contained in:
Arnaud Charlet 2009-08-17 11:45:27 +02:00
parent 48eff28313
commit 5568b57c51
5 changed files with 43 additions and 21 deletions

View File

@ -1,3 +1,27 @@
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>
* prj-env.adb: Minor reformatting

View File

@ -95,10 +95,11 @@ package body Exp_Ch3 is
(Rec_Id : Entity_Id;
Use_Dl : Boolean) return List_Id;
-- 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
-- is set, the list is built using the already defined discriminals
-- of the type. Otherwise new identifiers are created, with the source
-- names of the discriminants.
-- formal parameters, used in Build_Init_Procedure among other places.
-- If the flag Use_Dl is set, the list is built using the already
-- defined discriminals of the type, as is the case for concurrent
-- 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;
-- This function builds a static aggregate that can serve as the initial
@ -1141,6 +1142,7 @@ package body Exp_Ch3 is
Parameter_List : constant List_Id := New_List;
D : Entity_Id;
Formal : Entity_Id;
Formal_Type : Entity_Id;
Param_Spec_Node : Node_Id;
begin
@ -1151,15 +1153,17 @@ package body Exp_Ch3 is
if Use_Dl then
Formal := Discriminal (D);
Formal_Type := Etype (Formal);
else
Formal := Make_Defining_Identifier (Loc, Chars (D));
Formal_Type := Etype (D);
end if;
Param_Spec_Node :=
Make_Parameter_Specification (Loc,
Defining_Identifier => Formal,
Parameter_Type =>
New_Reference_To (Etype (D), Loc));
New_Reference_To (Formal_Type, Loc));
Append (Param_Spec_Node, Parameter_List);
Next_Discriminant (D);
end loop;

View File

@ -3554,9 +3554,7 @@ package body Exp_Ch7 is
Loc : constant Source_Ptr := Sloc (N);
E : constant Entity_Id := Make_Temporary (Loc, 'E', N);
Etyp : constant Entity_Id := Etype (N);
Expr : constant Node_Id := Relocate_Node (N);
-- Capture this node because the call to Adjust_SCIL_Node can ???
Expr : constant Node_Id := Relocate_Node (N);
begin
-- If the relocated node is a function call then check if some SCIL

View File

@ -645,7 +645,7 @@ package body Make is
-- the fact that this ALI file is read-only.
procedure Process_Multilib;
-- Add appropriate --RTS argument to handle multilib.
-- Add appropriate --RTS argument to handle multilib
----------------------------------------------------
-- Compiler, Binder & Linker Data and Subprograms --
@ -7304,7 +7304,6 @@ package body Make is
----------------------
procedure Process_Multilib is
Output_FD : File_Descriptor;
Output_Name : String_Access;
Arg_Index : Natural := 0;
@ -7331,7 +7330,6 @@ package body Make is
Arg_Index := Arg_Index + 1;
Args (Arg_Index) := new String'(Argv);
end if;
end;
end loop;
@ -7345,22 +7343,24 @@ package body Make is
Multilib_Gcc := Gcc;
end if;
Multilib_Gcc_Path :=
GNAT.OS_Lib.Locate_Exec_On_Path (Multilib_Gcc.all);
Multilib_Gcc_Path := GNAT.OS_Lib.Locate_Exec_On_Path (Multilib_Gcc.all);
Create_Temp_File (Output_FD, Output_Name);
if Output_FD = Invalid_FD then
return;
end if;
GNAT.OS_Lib.Spawn (Multilib_Gcc_Path.all, Args, Output_FD,
Return_Code, False);
GNAT.OS_Lib.Spawn
(Multilib_Gcc_Path.all, Args, Output_FD, Return_Code, False);
Close (Output_FD);
if Return_Code /= 0 then
return;
end if;
Output_FD := Open_Read (Output_Name.all, Binary);
if Output_FD = Invalid_FD then
return;
end if;
@ -7382,9 +7382,7 @@ package body Make is
end if;
Scan_Make_Arg ("-margs", And_Save => True);
Scan_Make_Arg ("--RTS=" & Line (1 .. N_Read),
And_Save => True);
Scan_Make_Arg ("--RTS=" & Line (1 .. N_Read), And_Save => True);
end Process_Multilib;
-----------------------------
@ -7396,6 +7394,7 @@ package body Make is
Seen : Project_Boolean_Htable.Instance := Project_Boolean_Htable.Nil;
procedure Recurse (Prj : Project_Id; Depth : Natural);
-- Recursive procedure that does the work, keeping track of the depth
-------------
-- Recurse --

View File

@ -222,8 +222,6 @@ package body Prj.Env is
-- Add_To_Buffer --
-------------------
-- Wouldn't it be more consistent to use a Table for Buffer ???
procedure Add_To_Buffer
(S : String;
Buffer : in out String_Access;
@ -236,7 +234,6 @@ package body Prj.Env is
declare
New_Buffer : constant String_Access :=
new String (1 .. 2 * Buffer'Last);
begin
New_Buffer (1 .. Buffer_Last) := Buffer (1 .. Buffer_Last);
Free (Buffer);