mirror of git://gcc.gnu.org/git/gcc.git
[multiple changes]
2009-09-17 Emmanuel Briot <briot@adacore.com> * prj-conf.adb, prj-env.adb, prj-env.ads (Create_Temp_File): Moved to spec. (Do_Autoconf): If the object directory does not exists, create auto.cgpr in a temporary directory instead 2009-09-17 Bob Duff <duff@adacore.com> * a-dynpri.adb (Set_Priority): Don't do anything if the task is already terminated. (Get_Priority): Correct message for "terminated" case -- it said "null". 2009-09-17 Robert Dewar <dewar@adacore.com> * exp_ch6.adb: Minor reformatting From-SVN: r151795
This commit is contained in:
parent
52545f22b4
commit
1c6b973ab5
|
@ -1,3 +1,20 @@
|
||||||
|
2009-09-17 Emmanuel Briot <briot@adacore.com>
|
||||||
|
|
||||||
|
* prj-conf.adb, prj-env.adb, prj-env.ads (Create_Temp_File): Moved to
|
||||||
|
spec.
|
||||||
|
(Do_Autoconf): If the object directory does not exists, create auto.cgpr
|
||||||
|
in a temporary directory instead
|
||||||
|
|
||||||
|
2009-09-17 Bob Duff <duff@adacore.com>
|
||||||
|
|
||||||
|
* a-dynpri.adb (Set_Priority): Don't do anything if the task is already
|
||||||
|
terminated.
|
||||||
|
(Get_Priority): Correct message for "terminated" case -- it said "null".
|
||||||
|
|
||||||
|
2009-09-17 Robert Dewar <dewar@adacore.com>
|
||||||
|
|
||||||
|
* exp_ch6.adb: Minor reformatting
|
||||||
|
|
||||||
2009-09-17 Emmanuel Briot <briot@adacore.com>
|
2009-09-17 Emmanuel Briot <briot@adacore.com>
|
||||||
|
|
||||||
* gnatcmd.adb, make.adb, prj-part.adb, prj-ext.adb, prj-ext.ads,
|
* gnatcmd.adb, make.adb, prj-part.adb, prj-ext.adb, prj-ext.ads,
|
||||||
|
|
|
@ -67,7 +67,7 @@ package body Ada.Dynamic_Priorities is
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
if Task_Identification.Is_Terminated (T) then
|
if Task_Identification.Is_Terminated (T) then
|
||||||
raise Tasking_Error with Error_Message & "null task";
|
raise Tasking_Error with Error_Message & "terminated task";
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
return Target.Common.Base_Priority;
|
return Target.Common.Base_Priority;
|
||||||
|
@ -93,8 +93,12 @@ package body Ada.Dynamic_Priorities is
|
||||||
raise Program_Error with Error_Message & "null task";
|
raise Program_Error with Error_Message & "null task";
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
-- Setting the priority of an already-terminated task doesn't do
|
||||||
|
-- anything (see RM-D.5.1(7)). Note that Get_Priority is different in
|
||||||
|
-- this regard.
|
||||||
|
|
||||||
if Task_Identification.Is_Terminated (T) then
|
if Task_Identification.Is_Terminated (T) then
|
||||||
raise Tasking_Error with Error_Message & "terminated task";
|
return;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
SSL.Abort_Defer.all;
|
SSL.Abort_Defer.all;
|
||||||
|
|
|
@ -171,9 +171,9 @@ package body Exp_Ch6 is
|
||||||
--
|
--
|
||||||
-- A := TypeA (Temp);
|
-- A := TypeA (Temp);
|
||||||
--
|
--
|
||||||
-- after the call. Here TypeA is the actual type of variable A.
|
-- after the call. Here TypeA is the actual type of variable A. For out
|
||||||
-- For out parameters, the initial declaration has no expression.
|
-- parameters, the initial declaration has no expression. If A is not an
|
||||||
-- If A is not an entity name, we generate instead:
|
-- entity name, we generate instead:
|
||||||
--
|
--
|
||||||
-- Var : TypeA renames A;
|
-- Var : TypeA renames A;
|
||||||
-- Temp : T := Var; -- omitting expression for out parameter.
|
-- Temp : T := Var; -- omitting expression for out parameter.
|
||||||
|
@ -183,8 +183,8 @@ package body Exp_Ch6 is
|
||||||
-- For other in-out parameters, we emit the required constraint checks
|
-- For other in-out parameters, we emit the required constraint checks
|
||||||
-- before and/or after the call.
|
-- before and/or after the call.
|
||||||
--
|
--
|
||||||
-- For all parameter modes, actuals that denote components and slices
|
-- For all parameter modes, actuals that denote components and slices of
|
||||||
-- of packed arrays are expanded into suitable temporaries.
|
-- packed arrays are expanded into suitable temporaries.
|
||||||
--
|
--
|
||||||
-- For non-scalar objects that are possibly unaligned, add call by copy
|
-- For non-scalar objects that are possibly unaligned, add call by copy
|
||||||
-- code (copy in for IN and IN OUT, copy out for OUT and IN OUT).
|
-- code (copy in for IN and IN OUT, copy out for OUT and IN OUT).
|
||||||
|
@ -419,8 +419,8 @@ package body Exp_Ch6 is
|
||||||
|
|
||||||
-- Create the actual which is a pointer to the appropriate finalization
|
-- Create the actual which is a pointer to the appropriate finalization
|
||||||
-- list. Acc_Type is present if and only if this call is the
|
-- list. Acc_Type is present if and only if this call is the
|
||||||
-- initialization of an allocator. Use the Current_Scope or the Acc_Type
|
-- initialization of an allocator. Use the Current_Scope or the
|
||||||
-- as appropriate.
|
-- Acc_Type as appropriate.
|
||||||
|
|
||||||
if Present (Acc_Type)
|
if Present (Acc_Type)
|
||||||
and then (Ekind (Acc_Type) = E_Anonymous_Access_Type
|
and then (Ekind (Acc_Type) = E_Anonymous_Access_Type
|
||||||
|
|
|
@ -29,6 +29,7 @@ with Makeutl; use Makeutl;
|
||||||
with MLib.Tgt;
|
with MLib.Tgt;
|
||||||
with Opt; use Opt;
|
with Opt; use Opt;
|
||||||
with Output; use Output;
|
with Output; use Output;
|
||||||
|
with Prj.Env;
|
||||||
with Prj.Err;
|
with Prj.Err;
|
||||||
with Prj.Part;
|
with Prj.Part;
|
||||||
with Prj.PP;
|
with Prj.PP;
|
||||||
|
@ -696,6 +697,7 @@ package body Prj.Conf is
|
||||||
Switches : Argument_List_Access := Get_Config_Switches;
|
Switches : Argument_List_Access := Get_Config_Switches;
|
||||||
Args : Argument_List (1 .. 5);
|
Args : Argument_List (1 .. 5);
|
||||||
Arg_Last : Positive;
|
Arg_Last : Positive;
|
||||||
|
Obj_Dir_Exists : Boolean := True;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
-- Check if the object directory exists. If Setup_Projects is True
|
-- Check if the object directory exists. If Setup_Projects is True
|
||||||
|
@ -731,6 +733,7 @@ package body Prj.Conf is
|
||||||
Prj.Err.Error_Msg
|
Prj.Err.Error_Msg
|
||||||
(Flags,
|
(Flags,
|
||||||
"?object directory " & Obj_Dir & " does not exist");
|
"?object directory " & Obj_Dir & " does not exist");
|
||||||
|
Obj_Dir_Exists := False;
|
||||||
when Silent =>
|
when Silent =>
|
||||||
null;
|
null;
|
||||||
end case;
|
end case;
|
||||||
|
@ -744,8 +747,30 @@ package body Prj.Conf is
|
||||||
-- If no config file was specified, set the auto.cgpr one
|
-- If no config file was specified, set the auto.cgpr one
|
||||||
|
|
||||||
if Config_File_Name = "" then
|
if Config_File_Name = "" then
|
||||||
|
if Obj_Dir_Exists then
|
||||||
Args (3) := new String'
|
Args (3) := new String'
|
||||||
(Obj_Dir & Directory_Separator & Auto_Cgpr);
|
(Obj_Dir & Directory_Separator & Auto_Cgpr);
|
||||||
|
else
|
||||||
|
declare
|
||||||
|
Path_FD : File_Descriptor;
|
||||||
|
Path_Name : Path_Name_Type;
|
||||||
|
begin
|
||||||
|
Prj.Env.Create_Temp_File
|
||||||
|
(In_Tree => Project_Tree,
|
||||||
|
Path_FD => Path_FD,
|
||||||
|
Path_Name => Path_Name,
|
||||||
|
File_Use => "configuration file");
|
||||||
|
|
||||||
|
if Path_FD /= Invalid_FD then
|
||||||
|
Args (3) := new String'(Get_Name_String (Path_Name));
|
||||||
|
GNAT.OS_Lib.Close (Path_FD);
|
||||||
|
else
|
||||||
|
-- We'll have an error message later on
|
||||||
|
Args (3) := new String'
|
||||||
|
(Obj_Dir & Directory_Separator & Auto_Cgpr);
|
||||||
|
end if;
|
||||||
|
end;
|
||||||
|
end if;
|
||||||
else
|
else
|
||||||
Args (3) := new String'(Config_File_Name);
|
Args (3) := new String'(Config_File_Name);
|
||||||
end if;
|
end if;
|
||||||
|
|
|
@ -97,14 +97,6 @@ package body Prj.Env is
|
||||||
-- Return a project that is either Project or an extended ancestor of
|
-- Return a project that is either Project or an extended ancestor of
|
||||||
-- Project that itself is not extended.
|
-- Project that itself is not extended.
|
||||||
|
|
||||||
procedure Create_Temp_File
|
|
||||||
(In_Tree : Project_Tree_Ref;
|
|
||||||
Path_FD : out File_Descriptor;
|
|
||||||
Path_Name : out Path_Name_Type;
|
|
||||||
File_Use : String);
|
|
||||||
-- Create a temporary file, and fail with an error if it could not be
|
|
||||||
-- created.
|
|
||||||
|
|
||||||
----------------------
|
----------------------
|
||||||
-- Ada_Include_Path --
|
-- Ada_Include_Path --
|
||||||
----------------------
|
----------------------
|
||||||
|
|
|
@ -39,6 +39,14 @@ package Prj.Env is
|
||||||
-- of package Fmap), so that Osint.Find_File will find the correct path
|
-- of package Fmap), so that Osint.Find_File will find the correct path
|
||||||
-- corresponding to a source.
|
-- corresponding to a source.
|
||||||
|
|
||||||
|
procedure Create_Temp_File
|
||||||
|
(In_Tree : Project_Tree_Ref;
|
||||||
|
Path_FD : out File_Descriptor;
|
||||||
|
Path_Name : out Path_Name_Type;
|
||||||
|
File_Use : String);
|
||||||
|
-- Create a temporary file, and fail with an error if it could not be
|
||||||
|
-- created.
|
||||||
|
|
||||||
procedure Create_Mapping_File
|
procedure Create_Mapping_File
|
||||||
(Project : Project_Id;
|
(Project : Project_Id;
|
||||||
Language : Name_Id;
|
Language : Name_Id;
|
||||||
|
|
Loading…
Reference in New Issue