]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Simplify appending to a newly created list
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 14 Apr 2023 11:11:03 +0000 (13:11 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 13 Jun 2023 07:31:42 +0000 (09:31 +0200)
Code cleanup; semantics is unaffected.

gcc/ada/

* exp_disp.adb (Make_Disp_Asynchronous_Select_Spec): Use a single call
to New_List.

gcc/ada/exp_disp.adb

index 494ead7c144dcf3c85de4511cf5fc2d954af3239..9381ceee60c8d8cfffb4459d0359caea4cb9e8ca 100644 (file)
@@ -2755,7 +2755,7 @@ package body Exp_Disp is
       Def_Id : constant Entity_Id  :=
                  Make_Defining_Identifier (Loc,
                    Name_uDisp_Asynchronous_Select);
-      Params : constant List_Id    := New_List;
+      Params : List_Id;
 
    begin
       pragma Assert (not Restriction_Active (No_Dispatching_Calls));
@@ -2770,7 +2770,7 @@ package body Exp_Disp is
 
       Set_Warnings_Off (B_Id);
 
-      Append_List_To (Params, New_List (
+      Params := New_List (
 
         Make_Parameter_Specification (Loc,
           Defining_Identifier => Make_Defining_Identifier (Loc, Name_uT),
@@ -2795,7 +2795,7 @@ package body Exp_Disp is
         Make_Parameter_Specification (Loc,
           Defining_Identifier => Make_Defining_Identifier (Loc, Name_uF),
           Parameter_Type      => New_Occurrence_Of (Standard_Boolean, Loc),
-          Out_Present         => True)));
+          Out_Present         => True));
 
       return
         Make_Procedure_Specification (Loc,