From: "Marc Poulhiès" <poulhies@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Piotr Trojanek <trojanek@adacore.com>
Subject: [COMMITTED] ada: Simplify appending to a newly created list
Date: Tue, 13 Jun 2023 09:37:40 +0200 [thread overview]
Message-ID: <20230613073740.238900-1-poulhies@adacore.com> (raw)
From: Piotr Trojanek <trojanek@adacore.com>
Code cleanup; semantics is unaffected.
gcc/ada/
* exp_disp.adb (Make_Disp_Asynchronous_Select_Spec): Use a single call
to New_List.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/exp_disp.adb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb
index 494ead7c144..9381ceee60c 100644
--- a/gcc/ada/exp_disp.adb
+++ b/gcc/ada/exp_disp.adb
@@ -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,
--
2.40.0
reply other threads:[~2023-06-13 7:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230613073740.238900-1-poulhies@adacore.com \
--to=poulhies@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=trojanek@adacore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).