From patchwork Tue Jun 13 07:37:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 107132 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp365524vqr; Tue, 13 Jun 2023 00:39:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ghbXyv7QjMjsycdu/LcjVb3Kvu112O5Z2CpVehekND74NES0aA1hQdbDla955PNXTGCkW X-Received: by 2002:a17:907:98d:b0:957:1df0:9cbf with SMTP id bf13-20020a170907098d00b009571df09cbfmr11026575ejc.19.1686641970874; Tue, 13 Jun 2023 00:39:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686641970; cv=none; d=google.com; s=arc-20160816; b=DCOCDcjYpQATF+eougHgtpUMFo5pEE0C22BflN1Agf7TpNbypcQ9mKdndilcXhgCMl /X1e/ku4fp5pCORudgHXeympI++an4nabaIioyQfbJMYXY1GYUft59IiMAV8Dwqc//ZT ombm37XMrc8tKRifrw/pUQpyzFke9X7pYJJlNUelNvivwqnzCPkEgLTOg4D3CtleSxx/ 8keCaTv0aSP2H5Uwik/HLlD+yR4fFJjjOKaPDGn2IrHhOtwdaKCx4d7KkLxN6n2JR8uo FmUi1e04RxWOlWBXUb096nSQBVL2G0JkvMUKr9pUhZVeOuqhP3kUtkdMrVH659v8NuF5 0bzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=LcN575O3X4HLuR3xebfg4eredtrCz6kwCJk9OP4Syv0=; b=FxBHUtMm9PHceT8BKmCbHfdvTAsHejph8Lp7tvERV9RWGWizpjEDzlHCbqo0y17SZm +Nzw398M3zTO4mKINNu+Sj4AWD+L/BYA8ZLxA4K3aAyMsZouyUUGhm86xWZfmnsBP9hC C13KiJOiBCZ9npMDRKpufSLPJLL1Z4aBoKwP7ENB3lY7uZL3YG8tJIHDvZUiSztafO4n nX/RUADhhXNG2psx4/b7M/yCXov8fS8D/MKDb96CpiE9dPve5evICaMcnpdAuyrQVk+o S5KCv1iuIQ3bCMWxl3SKHzIouhn8GpN0cr9VxkMNyOF/oc21T49ic7jhH4px/XJFNbNn +1pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=jakLgHRq; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id u10-20020a05640207ca00b0050bc806ca61si2728412edy.573.2023.06.13.00.39.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 00:39:30 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=jakLgHRq; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9F7C73857C51 for ; Tue, 13 Jun 2023 07:39:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F7C73857C51 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686641961; bh=LcN575O3X4HLuR3xebfg4eredtrCz6kwCJk9OP4Syv0=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=jakLgHRqA1xx3RPA4c9QV9RVBmOlGIHDh86t0xv3MiYWk/aVLJO2OqLPdbXT4QjI9 aJjNY1RGGTYiYAX5hrFKOtf64EdAjaWOeSVKS2SNUeFLpORkDahc+JFDAE9pZGaqIW b3yHV9E/bmoAa2RVi3/3dkfqlJJ3RTbmnTbxvdDw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 507243858C1F for ; Tue, 13 Jun 2023 07:37:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 507243858C1F Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-30fbf6603d2so1970258f8f.0 for ; Tue, 13 Jun 2023 00:37:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686641862; x=1689233862; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LcN575O3X4HLuR3xebfg4eredtrCz6kwCJk9OP4Syv0=; b=bUshT4DN5FyKTTqeZfbZtMf6zzZyp1Nk8K9WLTyxkbm61++t6ug3QVODjbalH0rYiQ pPgIEtmc4aezcaDkaPBtEw7wYPHMc9nmFhr+CHE5/0fM92DA/5+D1QKiZy0NTK3WDXhT TBqXlVq7gFx9YfJKpViFeZ6Fw9ASLhCN7Ly3LQKPEl6BOMw9tfNaPJjy7cQ64CMUwS7/ XfwBQNftMr2bG+Km4oHYSHBiiTwwKl6f4opB/aectxFQvZJmfNWgzDvM7lHbSveVtpp+ Hi5pbQ8Bn7wkpwvWqd/ttK6FhiraKR/8O4MsFD3vfW0NN+LPCu7D+TOeNoMZoLHcv11n tQGg== X-Gm-Message-State: AC+VfDxkwdRtp2svLavfYrRsoOqPeG7dXx8YrC7D5OGVP5UaJRfoIRKc clrhXM9ptFFs7GmjDEmyBv6qlOaU4pUPHMOF3UfTEg== X-Received: by 2002:a5d:4952:0:b0:309:3bc3:7d1f with SMTP id r18-20020a5d4952000000b003093bc37d1fmr5423155wrs.70.1686641861976; Tue, 13 Jun 2023 00:37:41 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:bfa8:5d29:40e5:cc66]) by smtp.gmail.com with ESMTPSA id a9-20020a5d5089000000b0030ae973c2e7sm14477581wrt.83.2023.06.13.00.37.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 00:37:41 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED] ada: Simplify appending to a newly created list Date: Tue, 13 Jun 2023 09:37:40 +0200 Message-Id: <20230613073740.238900-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= From: =?utf-8?q?Marc_Poulhi=C3=A8s?= Reply-To: =?utf-8?q?Marc_Poulhi=C3=A8s?= Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768572291101734701?= X-GMAIL-MSGID: =?utf-8?q?1768572291101734701?= From: Piotr Trojanek 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,