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>
* gcc-interface/utils.c (maybe_pad_type): Do not apply adjustment to
......
......@@ -10538,7 +10538,7 @@ package body Sem_Ch6 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);
begin
......
......@@ -2128,18 +2128,19 @@ package body Sem_Util is
elsif Nkind (Parent (N)) = N_Component_Association
and then Nkind_In (Parent (Parent (N)),
N_Aggregate,
N_Extension_Aggregate)
N_Aggregate,
N_Extension_Aggregate)
then
declare
Choice : constant Node_Id := First (Choices (Parent (N)));
begin
if Ekind (Entity (N)) = E_Discriminant then
return Skip;
elsif Expression (Parent (N)) = N
and then Nkind (Choice) = N_Identifier
and then Ekind (Entity (Choice)) = E_Discriminant
and then Nkind (Choice) = N_Identifier
and then Ekind (Entity (Choice)) = E_Discriminant
then
return Skip;
end if;
......@@ -2194,9 +2195,10 @@ package body Sem_Util is
-- last (see comment in the body of traverse_func).
declare
Elmt : Elmt_Id := First_Elmt (Writable_Actuals_List);
Elmt : Elmt_Id;
begin
Elmt := First_Elmt (Writable_Actuals_List);
while Present (Elmt)
and then Entity (Node (Elmt)) /= Entity (N)
loop
......@@ -2210,7 +2212,7 @@ package body Sem_Util is
end if;
Error_Msg_NE
("value may be affected by call to& "
("value may be affected by call to & "
& "because order of evaluation is arbitrary",
Error_Node, Id);
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