From: Hristian Kirtchev Date: Thu, 4 Jul 2019 08:05:40 +0000 (+0000) Subject: [Ada] Minor reformatting X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bc1146e5e0979421b5dc2c9c005c355443c2fe24;p=gcc.git [Ada] Minor reformatting 2019-07-04 Hristian Kirtchev gcc/ada/ * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb: Minor reformatting. From-SVN: r273051 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 127c24346c6..6f300dceb81 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-07-04 Hristian Kirtchev + + * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb: + Minor reformatting. + 2019-07-04 Yannick Moy * sem_spark.adb (Explanation, Get_Expl): New functions to get diff --git a/gcc/ada/erroutc.adb b/gcc/ada/erroutc.adb index 0c8ef5de7cc..2ea0c2d2809 100644 --- a/gcc/ada/erroutc.adb +++ b/gcc/ada/erroutc.adb @@ -1606,6 +1606,7 @@ package body Erroutc is if Start <= Cur_Loc and then Cur_Loc <= Stop then return True; end if; + Cur_Loc := Instantiation_Location (Cur_Loc); end loop; diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 7099d93691c..7c41477e32d 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -1343,11 +1343,11 @@ package body Exp_Aggr is -- transient scope, which leads to premature finalization. -- This in-place expansion is not performed for limited transient - -- objects because the initialization is already done in-place. + -- objects, because the initialization is already done in place. if In_Place_Expansion then - -- Suppress the removal of side effects by general analysis + -- Suppress the removal of side effects by general analysis, -- because this behavior is emulated here. This avoids the -- generation of a transient scope, which leads to out-of-order -- adjustment and finalization. @@ -4181,8 +4181,8 @@ package body Exp_Aggr is return False; end if; - -- If association has a box, no way to determine yet - -- whether default can be assigned in place. + -- If association has a box, no way to determine yet whether + -- default can be assigned in place. elsif Box_Present (Expr) then return False; @@ -4239,8 +4239,8 @@ package body Exp_Aggr is and then Is_Array and then Check_Component (Prefix (Comp))) - or else (Nkind_In (Comp, N_Unchecked_Type_Conversion, - N_Type_Conversion) + or else (Nkind_In (Comp, N_Type_Conversion, + N_Unchecked_Type_Conversion) and then Check_Component (Expression (Comp))); end Check_Component; @@ -4269,12 +4269,10 @@ package body Exp_Aggr is return False; - elsif Nkind (Parent (Expr)) = - N_Iterated_Component_Association - then - -- Ditto for iterated component associations, which in - -- general require an enclosing loop and involve nonstatic - -- expressions. + elsif Nkind (Parent (Expr)) = N_Iterated_Component_Association then + + -- Ditto for iterated component associations, which in general + -- require an enclosing loop and involve nonstatic expressions. return False; end if; @@ -4469,8 +4467,8 @@ package body Exp_Aggr is Establish_Transient_Scope (N, Manage_Sec_Stack => False); end if; - -- If the aggregate is nonlimited, create a temporary since aggregates - -- have "by copy" semantic. If it is limited and context is an + -- If the aggregate is nonlimited, create a temporary, since aggregates + -- have "by copy" semantics. If it is limited and context is an -- assignment, this is a subaggregate for an enclosing aggregate being -- expanded. It must be built in place, so use target of the current -- assignment. @@ -4484,7 +4482,7 @@ package body Exp_Aggr is Rewrite (Parent (N), Make_Null_Statement (Loc)); -- Do not declare a temporary to initialize an aggregate assigned to an - -- identifier when in place assignment is possible preserving the + -- identifier when in-place assignment is possible, preserving the -- by-copy semantic of aggregates. This avoids large stack usage and -- generates more efficient code. @@ -5122,7 +5120,7 @@ package body Exp_Aggr is -- case pass it as is to Gigi. Note that a necessary condition for -- static processing is that the aggregate be fully positional. - -- 5. If in place aggregate expansion is possible (i.e. no need to create + -- 5. If in-place aggregate expansion is possible (i.e. no need to create -- a temporary) then mark the aggregate as such and return. Otherwise -- create a new temporary and generate the appropriate initialization -- code. @@ -5146,7 +5144,7 @@ package body Exp_Aggr is -- The type of each index In_Place_Assign_OK_For_Declaration : Boolean := False; - -- True if we are to generate an in place assignment for a declaration + -- True if we are to generate an in-place assignment for a declaration Maybe_In_Place_OK : Boolean; -- If the type is neither controlled nor packed and the aggregate @@ -6214,7 +6212,7 @@ package body Exp_Aggr is -- STEP 4 - -- Look if in place aggregate expansion is possible + -- Check whether in-place aggregate expansion is possible -- For object declarations we build the aggregate in place, unless -- the array is bit-packed. @@ -6366,7 +6364,7 @@ package body Exp_Aggr is -- Step 5 - -- In place aggregate expansion is not possible + -- In-place aggregate expansion is not possible else Maybe_In_Place_OK := False; @@ -6418,11 +6416,11 @@ package body Exp_Aggr is Target := New_Copy (Tmp); end if; - -- If we are to generate an in place assignment for a declaration or + -- If we are to generate an in-place assignment for a declaration or -- an assignment statement, and the assignment can be done directly -- by the back end, then do not expand further. - -- ??? We can also do that if in place expansion is not possible but + -- ??? We can also do that if in-place expansion is not possible but -- then we could go into an infinite recursion. if (In_Place_Assign_OK_For_Declaration or else Maybe_In_Place_OK) @@ -7683,8 +7681,8 @@ package body Exp_Aggr is P : Node_Id := Parent (N); begin - -- Aggregates are not supported for non standard rep clauses since - -- they may lead to extra padding fields in CCG. + -- Aggregates are not supported for nonstandard rep clauses, since they + -- may lead to extra padding fields in CCG. if Ekind (Etype (N)) in Record_Kind and then Has_Non_Standard_Rep (Etype (N)) diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index b2038a6a047..907975e8e51 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -2481,8 +2481,7 @@ package body Inline is -- thunk generated for it. Replace a return statement with an assignment -- to the target of the call, with appropriate conversions if needed. - function Process_Formals_In_Aspects (N : Node_Id) - return Traverse_Result; + function Process_Formals_In_Aspects (N : Node_Id) return Traverse_Result; -- Because aspects are linked indirectly to the rest of the tree, -- replacement of formals appearing in aspect specifications must -- be performed in a separate pass, using an instantiation of the @@ -2832,10 +2831,11 @@ package body Inline is -- Process_Formals_In_Aspects -- -------------------------------- - function Process_Formals_In_Aspects (N : Node_Id) - return Traverse_Result + function Process_Formals_In_Aspects + (N : Node_Id) return Traverse_Result is A : Node_Id; + begin if Has_Aspects (N) then A := First (Aspect_Specifications (N)); @@ -2849,7 +2849,7 @@ package body Inline is end Process_Formals_In_Aspects; procedure Replace_Formals_In_Aspects is - new Traverse_Proc (Process_Formals_In_Aspects); + new Traverse_Proc (Process_Formals_In_Aspects); ------------------ -- Process_Sloc -- diff --git a/gcc/ada/opt.adb b/gcc/ada/opt.adb index 05f9059eaa0..4ceffb02c36 100644 --- a/gcc/ada/opt.adb +++ b/gcc/ada/opt.adb @@ -254,6 +254,7 @@ package body Opt is if GNATprove_Mode then pragma Assert (Assertions_Enabled); null; + elsif GNAT_Mode_Config then Assertions_Enabled := Assertions_Enabled_Config; else diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 75a00996b85..a82c2bca23d 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -930,7 +930,8 @@ package body Sem_Ch3 is -- declaration may include an expression that is an allocator, whose -- expansion needs the proper Master for the created tasks. - if Nkind (Related_Nod) = N_Object_Declaration and then Expander_Active + if Expander_Active + and then Nkind (Related_Nod) = N_Object_Declaration then if Is_Limited_Record (Desig_Type) and then Is_Class_Wide_Type (Desig_Type) @@ -940,7 +941,8 @@ package body Sem_Ch3 is -- Similarly, if the type is an anonymous access that designates -- tasks, create a master entity for it in the current context. - elsif Has_Task (Desig_Type) and then Comes_From_Source (Related_Nod) + elsif Has_Task (Desig_Type) + and then Comes_From_Source (Related_Nod) then Build_Master_Entity (Defining_Identifier (Related_Nod)); Build_Master_Renaming (Anon_Type);