[multiple changes]

2012-07-23  Arnaud Charlet  <charlet@adacore.com>

	* s-tasinf-linux.ads: Fix typo.

2012-07-23  Thomas Quinot  <quinot@adacore.com>

	* exp_ch7.adb, switch-m.adb, exp_ch3.adb, freeze.adb: Minor reformatting

2012-07-23  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch5.adb (Expand_Iterator_Loop_Over_Array): If original
	loop carries an identifier, preserve it when rewriting it as a
	standard loop to validate exit statements that may reference
	that name in the body of the loop.

2012-07-23  Thomas Quinot  <quinot@adacore.com>

	* exp_ch9.adb: Minor code cleanup.

From-SVN: r189776
This commit is contained in:
Arnaud Charlet 2012-07-23 10:32:33 +02:00
parent d7a44b1442
commit c4250ab16b
8 changed files with 43 additions and 14 deletions

View File

@ -1,3 +1,22 @@
2012-07-23 Arnaud Charlet <charlet@adacore.com>
* s-tasinf-linux.ads: Fix typo.
2012-07-23 Thomas Quinot <quinot@adacore.com>
* exp_ch7.adb, switch-m.adb, exp_ch3.adb, freeze.adb: Minor reformatting
2012-07-23 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_Iterator_Loop_Over_Array): If original
loop carries an identifier, preserve it when rewriting it as a
standard loop to validate exit statements that may reference
that name in the body of the loop.
2012-07-23 Thomas Quinot <quinot@adacore.com>
* exp_ch9.adb: Minor code cleanup.
2012-07-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Selected_Component): When checking for

View File

@ -635,7 +635,7 @@ package body Exp_Ch3 is
-- but it properly belongs with the array type declaration. However, if
-- the freeze node is for a subtype of a type declared in another unit
-- it seems preferable to use the freeze node as the source location of
-- of the init.proc. In any case this is preferable for gcov usage, and
-- of the init proc. In any case this is preferable for gcov usage, and
-- the Sloc is not otherwise used by the compiler.
if In_Open_Scopes (Scope (A_Type)) then

View File

@ -3204,6 +3204,13 @@ package body Exp_Ch5 is
Statements => Stats,
End_Label => Empty);
-- If present, preserve identifier of loop, which can be used in
-- an exit statement in the body.
if Present (Identifier (N)) then
Set_Identifier (New_Loop, Relocate_Node (Identifier (N)));
end if;
-- Create the declarations for Iterator and cursor and insert them
-- before the source loop. Given that the domain of iteration is
-- already an entity, the iterator is just a renaming of that
@ -3380,6 +3387,13 @@ package body Exp_Ch5 is
end loop;
end if;
-- If original loop has a name, preserve it so it can be recognized by
-- an exit statement in the body of the rewritten loop.
if Present (Identifier (N)) then
Set_Identifier (Core_Loop, Relocate_Node (Identifier (N)));
end if;
Rewrite (N, Core_Loop);
Analyze (N);
end Expand_Iterator_Loop_Over_Array;

View File

@ -4565,7 +4565,7 @@ package body Exp_Ch7 is
Build_Exception_Handler (Fin_Data))));
-- The single raise statement must be inserted after all the
-- finalization blocks. And we put everything into a wrapper
-- finalization blocks, and we put everything into a wrapper
-- block to clearly expose the construct to the back-end.
if Present (Prev_Fin) then

View File

@ -10307,12 +10307,10 @@ package body Exp_Ch9 is
Proc : Node_Id)
is
Astmt : constant Node_Id := Accept_Statement (Alt);
Choices : List_Id;
Alt_Stats : List_Id;
begin
Adjust_Condition (Condition (Alt));
Choices := New_List (Make_Integer_Literal (Loc, Index));
-- Accept with body
@ -10354,7 +10352,7 @@ package body Exp_Ch9 is
Append_To (Alt_List,
Make_Case_Statement_Alternative (Loc,
Discrete_Choices => Choices,
Discrete_Choices => New_List (Make_Integer_Literal (Loc, Index)),
Statements => Alt_Stats));
end Process_Accept_Alternative;
@ -10364,7 +10362,6 @@ package body Exp_Ch9 is
procedure Process_Delay_Alternative (Alt : Node_Id; Index : Int) is
Dloc : constant Source_Ptr := Sloc (Delay_Statement (Alt));
Choices : List_Id;
Cond : Node_Id;
Delay_Alt : List_Id;
@ -10478,11 +10475,10 @@ package body Exp_Ch9 is
Append_List (Statements (Alt), Delay_Alt_List);
else
Choices := New_List (Make_Integer_Literal (Loc, Index));
Append_To (Delay_Alt_List,
Make_Case_Statement_Alternative (Loc,
Discrete_Choices => Choices,
Discrete_Choices => New_List (
Make_Integer_Literal (Loc, Index)),
Statements => Statements (Alt)));
end if;

View File

@ -3027,9 +3027,9 @@ package body Freeze is
end if;
end;
-- Pre/Post conditions are implemented through a subprogram in
-- Pre/post conditions are implemented through a subprogram in
-- the corresponding body, and therefore are not checked on an
-- imported subprogram for which the body is not available.
-- imported subprogram, for which the body is not available.
-- Could consider generating a wrapper to take care of this???

View File

@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2007-2009, Free Software Foundation, Inc. --
-- Copyright (C) 2007-2012, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@ -48,7 +48,7 @@ package System.Task_Info is
pragma Elaborate_Body;
-- To ensure that a body is allowed
-- Windows provides a way to define the ideal processor to use for a given
-- Linux provides a way to define the ideal processor to use for a given
-- thread. The ideal processor is not necessarily the one that will be used
-- by the OS but the OS will always try to schedule this thread to the
-- specified processor if it is available.

View File

@ -423,7 +423,7 @@ package body Switch.M is
return;
end if;
-- -gnatn may be -gnatn, -gnatn1 or -gnat2
-- -gnatn may be -gnatn, -gnatn1, or -gnatn2
when 'n' =>
Last_Stored := First_Stored;