Commit 3c971dcc by Arnaud Charlet

[multiple changes]

2010-10-12  Robert Dewar  <dewar@adacore.com>

	* sem_ch6.adb (Process_PPCs): Fix error in inheriting Pre'Class when no
	exception messages are generated.
	(Process_PPCs): Fix error in inheriting Pre'Class.

2010-10-12  Jose Ruiz  <ruiz@adacore.com>

	* gnatcmd.adb: Use response file for GNATstack.
	(Check_Files): Pass the list of .ci files for GNATstack using a response
	file to avoid problems with command line length.
	Factor out the code handling response file into a new procedure named
	Add_To_Response_File.

2010-10-12  Vincent Celier  <celier@adacore.com>

	* debug.adb: For gnatmake, document the meaning of -dm
	* make.adb (Gnatmake): If -dm is used, indicate the maximum number of
	simultaneous compilations.
	* switch-m.adb (Scan_Make_Switches): Allow -j0, meaning as many
	simultaneous compilations as the number of processors.

From-SVN: r165367
parent cf3e1041
2010-10-12 Robert Dewar <dewar@adacore.com>
* sem_ch6.adb (Process_PPCs): Fix error in inheriting Pre'Class when no
exception messages are generated.
(Process_PPCs): Fix error in inheriting Pre'Class.
2010-10-12 Jose Ruiz <ruiz@adacore.com>
* gnatcmd.adb: Use response file for GNATstack.
(Check_Files): Pass the list of .ci files for GNATstack using a response
file to avoid problems with command line length.
Factor out the code handling response file into a new procedure named
Add_To_Response_File.
2010-10-12 Vincent Celier <celier@adacore.com>
* debug.adb: For gnatmake, document the meaning of -dm
* make.adb (Gnatmake): If -dm is used, indicate the maximum number of
simultaneous compilations.
* switch-m.adb (Scan_Make_Switches): Allow -j0, meaning as many
simultaneous compilations as the number of processors.
2010-10-12 Joseph Myers <joseph@codesourcery.com>
* gcc-interface/Make-lang.in (ada/misc.o): Use $(OPTIONS_H)
......
......@@ -198,7 +198,7 @@ package body Debug is
-- dj
-- dk
-- dl
-- dm
-- dm Display the number of maximum simultaneous compilations
-- dn Do not delete temp files created by gnatmake
-- do
-- dp Prints the contents of the Q used by Make.Compile_Sources
......
......@@ -5321,6 +5321,11 @@ package body Make is
Saved_Maximum_Processes := Maximum_Processes;
end if;
if Debug.Debug_Flag_M then
Write_Line ("Maximum number of simultaneous compilations =" &
Saved_Maximum_Processes'Img);
end if;
-- Allocate as many temporary mapping file names as the maximum number
-- of compilations processed, for each possible project.
......
......@@ -8569,7 +8569,6 @@ package body Sem_Ch6 is
-- Now set the kind (mode) of each formal
Param_Spec := First (T);
while Present (Param_Spec) loop
Formal := Defining_Identifier (Param_Spec);
Set_Formal_Mode (Formal);
......@@ -8791,7 +8790,7 @@ package body Sem_Ch6 is
if Pragma_Name (Prag) = Name_Precondition
and then Class_Present (Prag)
then
Inherited_Precond := Grab_PPC;
Inherited_Precond := Grab_PPC (Inherited (J));
-- No precondition so far, so establish this as the first
......@@ -8838,23 +8837,27 @@ package body Sem_Ch6 is
-- also failed inherited precondition from bla
-- ...
declare
New_Msg : constant Node_Id :=
Get_Pragma_Arg
(Last
(Pragma_Argument_Associations
(Inherited_Precond)));
Old_Msg : constant Node_Id :=
Get_Pragma_Arg
(Last
(Pragma_Argument_Associations
(Precond)));
begin
Start_String (Strval (Old_Msg));
Store_String_Chars (ASCII.LF & " also ");
Store_String_Chars (Strval (New_Msg));
Set_Strval (Old_Msg, End_String);
end;
-- Skip this if exception locations are suppressed
if not Exception_Locations_Suppressed then
declare
New_Msg : constant Node_Id :=
Get_Pragma_Arg
(Last
(Pragma_Argument_Associations
(Inherited_Precond)));
Old_Msg : constant Node_Id :=
Get_Pragma_Arg
(Last
(Pragma_Argument_Associations
(Precond)));
begin
Start_String (Strval (Old_Msg));
Store_String_Chars (ASCII.LF & " also ");
Store_String_Chars (Strval (New_Msg));
Set_Strval (Old_Msg, End_String);
end;
end if;
end if;
end if;
......
......@@ -31,6 +31,8 @@ with Prj; use Prj;
with Prj.Env; use Prj.Env;
with Table;
with System.Multiprocessors; use System.Multiprocessors;
package body Switch.M is
package Normalized_Switches is new Table.Table
......@@ -751,14 +753,22 @@ package body Switch.M is
Ptr := Ptr + 1;
declare
Max_Proc : Pos;
Max_Proc : Nat;
begin
Scan_Pos (Switch_Chars, Max, Ptr, Max_Proc, C);
Scan_Nat (Switch_Chars, Max, Ptr, Max_Proc, C);
if Ptr <= Max then
Bad_Switch (Switch_Chars);
else
if Max_Proc = 0 then
Max_Proc := Nat (Number_Of_CPUs);
if Max_Proc = 0 then
Max_Proc := 1;
end if;
end if;
Maximum_Processes := Positive (Max_Proc);
end if;
end;
......
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