Commit 07aa5e6f by Robert Dewar Committed by Arnaud Charlet

sem_util.adb: Minor code reorganization.

2015-05-26  Robert Dewar  <dewar@adacore.com>

	* sem_util.adb: Minor code reorganization.
	* sem_ch6.adb: Minor reformatting.

From-SVN: r223662
parent 70ce4679
2015-05-26 Robert Dewar <dewar@adacore.com>
* sem_util.adb: Minor code reorganization.
* sem_ch6.adb: Minor reformatting.
2015-05-25 Eric Botcazou <ebotcazou@adacore.com> 2015-05-25 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to * gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
......
...@@ -10538,7 +10538,7 @@ package body Sem_Ch6 is ...@@ -10538,7 +10538,7 @@ package body Sem_Ch6 is
--------------------- ---------------------
procedure Set_Formal_Mode (Formal_Id : Entity_Id) is procedure Set_Formal_Mode (Formal_Id : Entity_Id) is
Spec : constant Node_Id := Parent (Formal_Id); Spec : constant Node_Id := Parent (Formal_Id);
Id : constant Entity_Id := Scope (Formal_Id); Id : constant Entity_Id := Scope (Formal_Id);
begin begin
......
...@@ -2128,18 +2128,19 @@ package body Sem_Util is ...@@ -2128,18 +2128,19 @@ package body Sem_Util is
elsif Nkind (Parent (N)) = N_Component_Association elsif Nkind (Parent (N)) = N_Component_Association
and then Nkind_In (Parent (Parent (N)), and then Nkind_In (Parent (Parent (N)),
N_Aggregate, N_Aggregate,
N_Extension_Aggregate) N_Extension_Aggregate)
then then
declare declare
Choice : constant Node_Id := First (Choices (Parent (N))); Choice : constant Node_Id := First (Choices (Parent (N)));
begin begin
if Ekind (Entity (N)) = E_Discriminant then if Ekind (Entity (N)) = E_Discriminant then
return Skip; return Skip;
elsif Expression (Parent (N)) = N elsif Expression (Parent (N)) = N
and then Nkind (Choice) = N_Identifier and then Nkind (Choice) = N_Identifier
and then Ekind (Entity (Choice)) = E_Discriminant and then Ekind (Entity (Choice)) = E_Discriminant
then then
return Skip; return Skip;
end if; end if;
...@@ -2194,9 +2195,10 @@ package body Sem_Util is ...@@ -2194,9 +2195,10 @@ package body Sem_Util is
-- last (see comment in the body of traverse_func). -- last (see comment in the body of traverse_func).
declare declare
Elmt : Elmt_Id := First_Elmt (Writable_Actuals_List); Elmt : Elmt_Id;
begin begin
Elmt := First_Elmt (Writable_Actuals_List);
while Present (Elmt) while Present (Elmt)
and then Entity (Node (Elmt)) /= Entity (N) and then Entity (Node (Elmt)) /= Entity (N)
loop loop
...@@ -2210,7 +2212,7 @@ package body Sem_Util is ...@@ -2210,7 +2212,7 @@ package body Sem_Util is
end if; end if;
Error_Msg_NE Error_Msg_NE
("value may be affected by call to& " ("value may be affected by call to & "
& "because order of evaluation is arbitrary", & "because order of evaluation is arbitrary",
Error_Node, Id); Error_Node, Id);
return Abandon; return Abandon;
......
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