From: Hristian Kirtchev Date: Mon, 28 May 2018 08:53:29 +0000 (+0000) Subject: [Ada] Minor reformatting X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b19c244561c5d8c312af9e44eb62e77d42e1e65;p=gcc.git [Ada] Minor reformatting 2018-05-28 Hristian Kirtchev gcc/ada/ * exp_aggr.adb, gnatlink.adb, sem_ch6.adb, sem_res.adb, sem_util.adb: Minor reformatting. From-SVN: r260821 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 324645dd970..2ab132351bc 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-05-28 Hristian Kirtchev + + * exp_aggr.adb, gnatlink.adb, sem_ch6.adb, sem_res.adb, sem_util.adb: + Minor reformatting. + 2018-05-28 Hristian Kirtchev * sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Include diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index f045e3fe425..c7158a39554 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -4367,8 +4367,8 @@ package body Exp_Aggr is elsif Nkind (Expression (Expr)) /= N_Aggregate or else not Compile_Time_Known_Aggregate (Expression (Expr)) or else Expansion_Delayed (Expression (Expr)) - or else Nkind (Expr) = N_Iterated_Component_Association - or else Nkind (Expr) = N_Quantified_Expression + or else Nkind_In (Expr, N_Iterated_Component_Association, + N_Quantified_Expression) then Static_Components := False; exit; @@ -4520,22 +4520,22 @@ package body Exp_Aggr is -- If we have an others choice, fill in the missing elements -- subject to the limit established by Max_Others_Replicate. -- 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. if Nkind (Choice) = N_Others_Choice then Rep_Count := 0; - if Nkind_In (Expression (Elmt), - N_Quantified_Expression, - N_Iterated_Component_Association) + if Nkind_In (Expression (Elmt), + N_Iterated_Component_Association, + N_Quantified_Expression) then return False; end if; for J in Vals'Range loop if No (Vals (J)) then - Vals (J) := New_Copy_Tree (Expression (Elmt)); + Vals (J) := New_Copy_Tree (Expression (Elmt)); Rep_Count := Rep_Count + 1; -- Check for maximum others replication. Note that diff --git a/gcc/ada/gnatlink.adb b/gcc/ada/gnatlink.adb index 855d6d38a5b..f712a7abb6c 100644 --- a/gcc/ada/gnatlink.adb +++ b/gcc/ada/gnatlink.adb @@ -513,8 +513,8 @@ procedure Gnatlink is ("Could not locate linker: " & L_Args.all (1).all); end if; - -- The other arguments are passed as-is to the linker - -- and override those coming from --GCC= if any. + -- The other arguments are passed as-is to the linker and + -- override those coming from --GCC= if any. if L_Args.all'Last >= 2 then Gcc_Linker_Options.Set_Last (0); diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 3d8849a0491..1580be1a2ad 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -794,8 +794,8 @@ package body Sem_Ch6 is Form_New_Spec : Entity_Id; Form_Old_Def : Entity_Id; Form_Old_Spec : Entity_Id; - begin + begin Form_New_Spec := First (Parameter_Specifications (New_Spec)); Form_Old_Spec := First (Parameter_Specifications (Spec)); @@ -809,13 +809,10 @@ package body Sem_Ch6 is -- formals we exempt them from unreferenced warnings by marking -- them as always referenced. - Set_Referenced - (Form_Old_Def, - (Is_Formal (Form_Old_Def) - and then Is_Controlling_Formal (Form_Old_Def)) - or else Referenced (Form_Old_Def)); - -- or else Is_Dispatching_Operation - -- (Corresponding_Spec (New_Body))); + Set_Referenced (Form_Old_Def, + (Is_Formal (Form_Old_Def) + and then Is_Controlling_Formal (Form_Old_Def)) + or else Referenced (Form_Old_Def)); Next (Form_New_Spec); Next (Form_Old_Spec); @@ -3843,9 +3840,8 @@ package body Sem_Ch6 is -- 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 - -- wrapper that calls the clone. - -- If N is a stub, this construction will take place when the proper - -- body is analyzed. + -- wrapper that calls the clone. If N is a stub, this construction will + -- take place when the proper body is analyzed. if Present (Spec_Id) and then Present (Class_Wide_Clone (Spec_Id)) diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index f0b77c1ba92..c30e869fec9 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -5280,15 +5280,13 @@ package body Sem_Res is Resolve (N, Universal_Integer); - elsif Etype (N) = T - and then B_Typ /= Universal_Fixed - then + elsif Etype (N) = T 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 -- 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); else diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index facacbea213..4d66d3898e7 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -3880,15 +3880,16 @@ package body Sem_Util is Result_Seen := True; 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 and then Is_Entity_Name (Name (N)) and then Entity (Name (N)) = Subp_Id and then not Is_Potentially_Unevaluated (N) then - Error_Msg_NE ("call to & within its postcondition " - & "will lead to infinite recursion?", N, Subp_Id); + Error_Msg_NE + ("call to & within its postcondition will lead to infinite " + & "recursion?", N, Subp_Id); return OK; -- Continue the traversal