]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Rename constant in Analyze_Component_Declaration
authorRonan Desplanques <desplanques@adacore.com>
Mon, 24 Mar 2025 11:19:07 +0000 (12:19 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 10 Jun 2025 07:32:05 +0000 (09:32 +0200)
"Typ" is typically used to name constants that are entity IDs for types.
Before this patch, a constant local to Analyze_Component_Declaration
designating a syntactic subtype indication had that name. This patch
renames it to "Ind".

Code cleanup; behavior is unaffected.

gcc/ada/ChangeLog:

* sem_ch3.adb (Analyze_Component_Declaration): Rename constant.

gcc/ada/sem_ch3.adb

index 45f7dc90aa45058fc79633fb6946ddcaf3e0f402..fb24f0f5db2f9eeeafd83fa4517fd6b10384d9cc 100644 (file)
@@ -1953,7 +1953,7 @@ package body Sem_Ch3 is
    procedure Analyze_Component_Declaration (N : Node_Id) is
       Id  : constant Entity_Id  := Defining_Identifier (N);
       E   : constant Node_Id    := Expression (N);
-      Typ : constant Node_Id    :=
+      Ind : constant Node_Id    :=
               Subtype_Indication (Component_Definition (N));
       T   : Entity_Id;
       P   : Entity_Id;
@@ -2052,7 +2052,7 @@ package body Sem_Ch3 is
       Generate_Definition (Id);
       Enter_Name (Id);
 
-      if Present (Typ) then
+      if Present (Ind) then
          T := Find_Type_Of_Object
                 (Subtype_Indication (Component_Definition (N)), N);