From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7871) id 605273858020; Mon, 14 Nov 2022 13:51:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 605273858020 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668433883; bh=Kf1pmWX/54TSSkaxdzfkF8+COUQXrfV7hDuLO20tadI=; h=From:To:Subject:Date:From; b=FgPxfYIlq3nUM4jAtQd9v/us0caOzhLUOp8o5C3g8bVoI988m29o/YTghA+e/8UwD rhy1MTiYRo7VajPkj9ODzSbgZDr2vJyJNU3PNqlkqRwOmRiPeQqqCOvNb8uyphhu46 xQ2Aod83pLR0E+/IG0GEVZ/OOdIcvO09qK3WY+cs= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Marc Poulhi?s To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-4009] ada: Fix style in code for generic formal subprograms with contracts X-Act-Checkin: gcc X-Git-Author: Piotr Trojanek X-Git-Refname: refs/heads/master X-Git-Oldrev: fe02d7d9135083ed157886913b4a83ebc88e987c X-Git-Newrev: 35f29cfe9f6e48dc570d4cd61b906c3cbb2e227a Message-Id: <20221114135123.605273858020@sourceware.org> Date: Mon, 14 Nov 2022 13:51:23 +0000 (GMT) List-Id: https://gcc.gnu.org/g:35f29cfe9f6e48dc570d4cd61b906c3cbb2e227a commit r13-4009-g35f29cfe9f6e48dc570d4cd61b906c3cbb2e227a Author: Piotr Trojanek Date: Fri Oct 28 22:10:25 2022 +0200 ada: Fix style in code for generic formal subprograms with contracts Code cleanup related to expansion generic formal subprograms with contracts for GNATprove. gcc/ada/ * inline.adb (Replace_Formal): Tune whitespace. * sem_ch12.adb (Check_Overloaded_Formal_Subprogram): Refine type of a formal parameter and local variable; this routine operates on nodes and not entities. * sem_ch12.ads: Tune whitespace. Diff: --- gcc/ada/inline.adb | 4 ++-- gcc/ada/sem_ch12.adb | 18 +++++++++--------- gcc/ada/sem_ch12.ads | 18 +++++++++--------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index a1ead98e67a..d33f5b4558e 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -4723,8 +4723,8 @@ package body Inline is -------------------- function Replace_Formal (N : Node_Id) return Traverse_Result is - A : Entity_Id; - E : Entity_Id; + A : Entity_Id; + E : Entity_Id; begin if Is_Entity_Name (N) and then Present (Entity (N)) then diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 7af365e49c9..03ce5d51a03 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -1151,7 +1151,7 @@ package body Sem_Ch12 is -- in which case the predefined operations will be used. This merits -- a warning because of the special semantics of fixed point ops. - procedure Check_Overloaded_Formal_Subprogram (Formal : Entity_Id); + procedure Check_Overloaded_Formal_Subprogram (Formal : Node_Id); -- Apply RM 12.3(9): if a formal subprogram is overloaded, the instance -- cannot have a named association for it. AI05-0025 extends this rule -- to formals of formal packages by AI05-0025, and it also applies to @@ -1259,15 +1259,15 @@ package body Sem_Ch12 is -- actuals. Append_To (Assoc_List, - Build_Subprogram_Body_Wrapper (Formal, Actual_Name)); + Build_Subprogram_Body_Wrapper (Formal, Actual_Name)); end Build_Subprogram_Wrappers; ---------------------------------------- -- Check_Overloaded_Formal_Subprogram -- ---------------------------------------- - procedure Check_Overloaded_Formal_Subprogram (Formal : Entity_Id) is - Temp_Formal : Entity_Id; + procedure Check_Overloaded_Formal_Subprogram (Formal : Node_Id) is + Temp_Formal : Node_Id; begin Temp_Formal := First (Formals); @@ -1449,8 +1449,8 @@ package body Sem_Ch12 is (F : Entity_Id; A_F : Entity_Id) return Node_Id is - Prev : Node_Id; - Act : Node_Id; + Prev : Node_Id; + Act : Node_Id; begin Is_Named_Assoc := False; @@ -6252,7 +6252,7 @@ package body Sem_Ch12 is while Present (Act) loop Append_To (Actuals, - Make_Identifier (Loc, Chars (Defining_Identifier (Act)))); + Make_Identifier (Loc, Chars (Defining_Identifier (Act)))); Next (Act); end loop; @@ -6273,8 +6273,8 @@ package body Sem_Ch12 is Specification => Spec_Node, Declarations => New_List, Handled_Statement_Sequence => - Make_Handled_Sequence_Of_Statements (Loc, - Statements => New_List (Stmt))); + Make_Handled_Sequence_Of_Statements (Loc, + Statements => New_List (Stmt))); return Body_Node; end Build_Subprogram_Body_Wrapper; diff --git a/gcc/ada/sem_ch12.ads b/gcc/ada/sem_ch12.ads index 58a94552991..69c9d6404e6 100644 --- a/gcc/ada/sem_ch12.ads +++ b/gcc/ada/sem_ch12.ads @@ -27,15 +27,15 @@ with Inline; use Inline; with Types; use Types; package Sem_Ch12 is - procedure Analyze_Generic_Package_Declaration (N : Node_Id); - procedure Analyze_Generic_Subprogram_Declaration (N : Node_Id); - procedure Analyze_Package_Instantiation (N : Node_Id); - procedure Analyze_Procedure_Instantiation (N : Node_Id); - procedure Analyze_Function_Instantiation (N : Node_Id); - procedure Analyze_Formal_Object_Declaration (N : Node_Id); - procedure Analyze_Formal_Type_Declaration (N : Node_Id); - procedure Analyze_Formal_Subprogram_Declaration (N : Node_Id); - procedure Analyze_Formal_Package_Declaration (N : Node_Id); + procedure Analyze_Generic_Package_Declaration (N : Node_Id); + procedure Analyze_Generic_Subprogram_Declaration (N : Node_Id); + procedure Analyze_Package_Instantiation (N : Node_Id); + procedure Analyze_Procedure_Instantiation (N : Node_Id); + procedure Analyze_Function_Instantiation (N : Node_Id); + procedure Analyze_Formal_Object_Declaration (N : Node_Id); + procedure Analyze_Formal_Type_Declaration (N : Node_Id); + procedure Analyze_Formal_Subprogram_Declaration (N : Node_Id); + procedure Analyze_Formal_Package_Declaration (N : Node_Id); procedure Start_Generic; -- Must be invoked before starting to process a generic spec or body