Commit 9b19c244 by Hristian Kirtchev Committed by Pierre-Marie de Rodat

[Ada] Minor reformatting

2018-05-28  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* exp_aggr.adb, gnatlink.adb, sem_ch6.adb, sem_res.adb, sem_util.adb:
	Minor reformatting.

From-SVN: r260821
parent aab1da2a
2018-05-28 Hristian Kirtchev <kirtchev@adacore.com> 2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
* exp_aggr.adb, gnatlink.adb, sem_ch6.adb, sem_res.adb, sem_util.adb:
Minor reformatting.
2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Include * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Include
the declarations of single concurrent types because they fall in the the declarations of single concurrent types because they fall in the
category of full type and object declarations. category of full type and object declarations.
......
...@@ -4367,8 +4367,8 @@ package body Exp_Aggr is ...@@ -4367,8 +4367,8 @@ package body Exp_Aggr is
elsif Nkind (Expression (Expr)) /= N_Aggregate elsif Nkind (Expression (Expr)) /= N_Aggregate
or else not Compile_Time_Known_Aggregate (Expression (Expr)) or else not Compile_Time_Known_Aggregate (Expression (Expr))
or else Expansion_Delayed (Expression (Expr)) or else Expansion_Delayed (Expression (Expr))
or else Nkind (Expr) = N_Iterated_Component_Association or else Nkind_In (Expr, N_Iterated_Component_Association,
or else Nkind (Expr) = N_Quantified_Expression N_Quantified_Expression)
then then
Static_Components := False; Static_Components := False;
exit; exit;
...@@ -4520,22 +4520,22 @@ package body Exp_Aggr is ...@@ -4520,22 +4520,22 @@ package body Exp_Aggr is
-- If we have an others choice, fill in the missing elements -- If we have an others choice, fill in the missing elements
-- subject to the limit established by Max_Others_Replicate. -- subject to the limit established by Max_Others_Replicate.
-- If the expression involves a construct that generates -- If the expression involves a construct that generates
-- a loop, we must generate individual assignmentw and -- a loop, we must generate individual assignments and
-- no flattening is possible. -- no flattening is possible.
if Nkind (Choice) = N_Others_Choice then if Nkind (Choice) = N_Others_Choice then
Rep_Count := 0; Rep_Count := 0;
if Nkind_In (Expression (Elmt), if Nkind_In (Expression (Elmt),
N_Quantified_Expression, N_Iterated_Component_Association,
N_Iterated_Component_Association) N_Quantified_Expression)
then then
return False; return False;
end if; end if;
for J in Vals'Range loop for J in Vals'Range loop
if No (Vals (J)) then if No (Vals (J)) then
Vals (J) := New_Copy_Tree (Expression (Elmt)); Vals (J) := New_Copy_Tree (Expression (Elmt));
Rep_Count := Rep_Count + 1; Rep_Count := Rep_Count + 1;
-- Check for maximum others replication. Note that -- Check for maximum others replication. Note that
......
...@@ -513,8 +513,8 @@ procedure Gnatlink is ...@@ -513,8 +513,8 @@ procedure Gnatlink is
("Could not locate linker: " & L_Args.all (1).all); ("Could not locate linker: " & L_Args.all (1).all);
end if; end if;
-- The other arguments are passed as-is to the linker -- The other arguments are passed as-is to the linker and
-- and override those coming from --GCC= if any. -- override those coming from --GCC= if any.
if L_Args.all'Last >= 2 then if L_Args.all'Last >= 2 then
Gcc_Linker_Options.Set_Last (0); Gcc_Linker_Options.Set_Last (0);
......
...@@ -794,8 +794,8 @@ package body Sem_Ch6 is ...@@ -794,8 +794,8 @@ package body Sem_Ch6 is
Form_New_Spec : Entity_Id; Form_New_Spec : Entity_Id;
Form_Old_Def : Entity_Id; Form_Old_Def : Entity_Id;
Form_Old_Spec : Entity_Id; Form_Old_Spec : Entity_Id;
begin
begin
Form_New_Spec := First (Parameter_Specifications (New_Spec)); Form_New_Spec := First (Parameter_Specifications (New_Spec));
Form_Old_Spec := First (Parameter_Specifications (Spec)); Form_Old_Spec := First (Parameter_Specifications (Spec));
...@@ -809,13 +809,10 @@ package body Sem_Ch6 is ...@@ -809,13 +809,10 @@ package body Sem_Ch6 is
-- formals we exempt them from unreferenced warnings by marking -- formals we exempt them from unreferenced warnings by marking
-- them as always referenced. -- them as always referenced.
Set_Referenced Set_Referenced (Form_Old_Def,
(Form_Old_Def, (Is_Formal (Form_Old_Def)
(Is_Formal (Form_Old_Def) and then Is_Controlling_Formal (Form_Old_Def))
and then Is_Controlling_Formal (Form_Old_Def)) or else Referenced (Form_Old_Def));
or else Referenced (Form_Old_Def));
-- or else Is_Dispatching_Operation
-- (Corresponding_Spec (New_Body)));
Next (Form_New_Spec); Next (Form_New_Spec);
Next (Form_Old_Spec); Next (Form_Old_Spec);
...@@ -3843,9 +3840,8 @@ package body Sem_Ch6 is ...@@ -3843,9 +3840,8 @@ package body Sem_Ch6 is
-- If the subprogram has a class-wide clone, build its body as a copy -- If the subprogram has a class-wide clone, build its body as a copy
-- of the original body, and rewrite body of original subprogram as a -- of the original body, and rewrite body of original subprogram as a
-- wrapper that calls the clone. -- wrapper that calls the clone. If N is a stub, this construction will
-- If N is a stub, this construction will take place when the proper -- take place when the proper body is analyzed.
-- body is analyzed.
if Present (Spec_Id) if Present (Spec_Id)
and then Present (Class_Wide_Clone (Spec_Id)) and then Present (Class_Wide_Clone (Spec_Id))
......
...@@ -5280,15 +5280,13 @@ package body Sem_Res is ...@@ -5280,15 +5280,13 @@ package body Sem_Res is
Resolve (N, Universal_Integer); Resolve (N, Universal_Integer);
elsif Etype (N) = T elsif Etype (N) = T and then B_Typ /= Universal_Fixed then
and then B_Typ /= Universal_Fixed
then
-- if the operand is part of a fixed multiplication operation, -- If the operand is part of a fixed multiplication operation,
-- a conversion will be applied to each operand, so resolve it -- a conversion will be applied to each operand, so resolve it
-- with its own type. -- with its own type.
if Nkind_In (Parent (N), N_Op_Multiply, N_Op_Divide) then if Nkind_In (Parent (N), N_Op_Divide, N_Op_Multiply) then
Resolve (N); Resolve (N);
else else
......
...@@ -3880,15 +3880,16 @@ package body Sem_Util is ...@@ -3880,15 +3880,16 @@ package body Sem_Util is
Result_Seen := True; Result_Seen := True;
return Abandon; return Abandon;
-- Warn on infinite recursion if call is to current function. -- Warn on infinite recursion if call is to current function
elsif Nkind (N) = N_Function_Call elsif Nkind (N) = N_Function_Call
and then Is_Entity_Name (Name (N)) and then Is_Entity_Name (Name (N))
and then Entity (Name (N)) = Subp_Id and then Entity (Name (N)) = Subp_Id
and then not Is_Potentially_Unevaluated (N) and then not Is_Potentially_Unevaluated (N)
then then
Error_Msg_NE ("call to & within its postcondition " Error_Msg_NE
& "will lead to infinite recursion?", N, Subp_Id); ("call to & within its postcondition will lead to infinite "
& "recursion?", N, Subp_Id);
return OK; return OK;
-- Continue the traversal -- Continue the traversal
......
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