From: Hristian Kirtchev Date: Tue, 9 Jul 2019 07:54:40 +0000 (+0000) Subject: [Ada] Minor reformatting X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=134f52b9c4f45076efe6a3c345e6e01e95998cc1;p=gcc.git [Ada] Minor reformatting 2019-07-09 Hristian Kirtchev gcc/ada/ * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb, sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor reformatting. From-SVN: r273282 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index adb86222a58..7d8ea33d555 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2019-07-09 Hristian Kirtchev + + * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb, + sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor + reformatting. + 2019-07-09 Ed Schonberg * sem_res.adb (Resolve_Equality_Op): If the node was overloaded, diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index e742ec3818c..48b4090a836 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -10712,7 +10712,7 @@ package body Exp_Ch9 is Make_Defining_Identifier (Eloc, New_External_Name (Chars (Ename), 'A', Num_Accept)); - -- Link the acceptor to the original receiving entry. + -- Link the acceptor to the original receiving entry Set_Ekind (PB_Ent, E_Procedure); Set_Receiving_Entry (PB_Ent, Eent); @@ -12666,8 +12666,9 @@ package body Exp_Ch9 is -- to Build_Simple_Entry_Call. if Is_Disp_Select then - -- Compute the delay at this stage because the evaluation of - -- its expression must not occur earlier (see ACVC C97302A). + + -- Compute the delay at this stage because the evaluation of its + -- expression must not occur earlier (see ACVC C97302A). Append_To (Stmts, Make_Assignment_Statement (Loc, @@ -14882,8 +14883,8 @@ package body Exp_Ch9 is -- Ditto for a package declaration or a full type declaration, etc. - elsif - (Nkind (N) = N_Package_Declaration and then N /= Specification (N)) + elsif (Nkind (N) = N_Package_Declaration + and then N /= Specification (N)) or else Nkind (N) in N_Declaration or else Nkind (N) in N_Renaming_Declaration then diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 77809bc16dd..9769d684922 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -5073,9 +5073,7 @@ package body Exp_Util is -- is necessary both for passing legality checks in GNAT and for precise -- analysis in GNATprove. - if GNATprove_Mode - and then not Is_Static_Expression (Exp) - then + if GNATprove_Mode and then not Is_Static_Expression (Exp) then return; end if; @@ -5100,7 +5098,7 @@ package body Exp_Util is -- This subtype indication may be used later for constraint checks -- we better make sure that if a variable was used as a bound of - -- of the original slice, its value is frozen. + -- the original slice, its value is frozen. Evaluate_Slice_Bounds (Exp); end; @@ -11693,7 +11691,7 @@ package body Exp_Util is Set_Assignment_OK (Res, Assignment_OK (Exp)); - -- Preserve the Do_Range_Check flag in all copies. + -- Preserve the Do_Range_Check flag in all copies Set_Do_Range_Check (Res, Do_Range_Check (Exp)); diff --git a/gcc/ada/repinfo.adb b/gcc/ada/repinfo.adb index 1ba7e11e67c..c378fb634a2 100644 --- a/gcc/ada/repinfo.adb +++ b/gcc/ada/repinfo.adb @@ -559,7 +559,9 @@ package body Repinfo is -- Note that formals are not annotated so we skip them here - elsif Ekind_In (E, E_Variable, E_Constant, E_Loop_Parameter) + elsif Ekind_In (E, E_Constant, + E_Loop_Parameter, + E_Variable) then if List_Representation_Info >= 2 then List_Object_Info (E); @@ -577,12 +579,12 @@ package body Repinfo is -- Recurse into bodies - elsif Ekind_In (E, E_Protected_Type, - E_Task_Type, + elsif Ekind_In (E, E_Package_Body, + E_Protected_Body, + E_Protected_Type, E_Subprogram_Body, - E_Package_Body, E_Task_Body, - E_Protected_Body) + E_Task_Type) then List_Entities (E, Bytes_Big_Endian); diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 9afa095c2a6..3aa49755b39 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -10315,7 +10315,7 @@ package body Sem_Ch12 is -- such as a parent generic within the body of a generic child. if not Is_Entity_Name (Actual) - or else not Ekind_In (Entity (Actual), E_Package, E_Generic_Package) + or else not Ekind_In (Entity (Actual), E_Generic_Package, E_Package) then Error_Msg_N ("expect package instance to instantiate formal", Actual); @@ -10354,13 +10354,11 @@ package body Sem_Ch12 is ("previous error in declaration of formal package", Actual); Abandon_Instantiation (Actual); - elsif - Is_Instance_Of (Parent_Spec, Get_Instance_Of (Gen_Parent)) - then + elsif Is_Instance_Of (Parent_Spec, Get_Instance_Of (Gen_Parent)) then null; - -- If this is the current instance of an enclosing generic, that - -- unit is the generic package we need. + -- If this is the current instance of an enclosing generic, that unit + -- is the generic package we need. elsif In_Open_Scopes (Actual_Pack) and then Ekind (Actual_Pack) = E_Generic_Package @@ -10425,7 +10423,7 @@ package body Sem_Ch12 is Actual_Ent := First_Entity (Actual_Pack); Actual_Of_Formal := - First (Visible_Declarations (Specification (Analyzed_Formal))); + First (Visible_Declarations (Specification (Analyzed_Formal))); while Present (Actual_Ent) and then Actual_Ent /= First_Private_Entity (Actual_Pack) loop diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 7f202215b18..97cf3fe2456 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -8963,8 +8963,7 @@ package body Sem_Prag is Mark_Rewrite_Insertion (Decl); else - Error_Pragma_Arg ("no matching type found for pragma%", - Arg2); + Error_Pragma_Arg ("no matching type found for pragma%", Arg2); end if; end Process_Import_Predefined_Type; diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index e32d5478c99..c151e7a39cb 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -8446,6 +8446,7 @@ package body Sem_Res is declare I : Interp_Index; It : Interp; + begin Get_First_Interp (N, I, It); @@ -10086,6 +10087,7 @@ package body Sem_Res is and then Is_Overloaded (Opnd) then Resolve_Equality_Op (Opnd, B_Typ); + if Ekind (Entity (Opnd)) = E_Function then Rewrite_Operator_As_Call (Opnd, Entity (Opnd)); end if; diff --git a/gcc/ada/sem_spark.adb b/gcc/ada/sem_spark.adb index bbd727987c6..70953b5b6da 100644 --- a/gcc/ada/sem_spark.adb +++ b/gcc/ada/sem_spark.adb @@ -1612,7 +1612,7 @@ package body Sem_SPARK is Move_Expression_List (Expressions (Expr)); - -- Handle the named components next. + -- Handle the named components next while Present (Assoc) loop CL := Choices (Assoc); @@ -1636,8 +1636,9 @@ package body Sem_SPARK is if Is_Deep (Etype (Expression (Assoc))) and then not Is_Singleton_Choice (CL) then - Error_Msg_F ("singleton choice required" - & " to prevent aliasing", First (CL)); + Error_Msg_F + ("singleton choice required to prevent aliasing", + First (CL)); end if; -- The subexpressions of an aggregate are moved as part diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 7b7d04470c5..19e0026d6f7 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -24269,8 +24269,9 @@ package body Sem_Util is Outer : Entity_Id) return Boolean is Curr : Entity_Id := Inner; + begin - -- Similar to the above, but check for scope identity first. + -- Similar to the above, but check for scope identity first while Present (Curr) and then Curr /= Standard_Standard loop if Curr = Outer then