From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id BDE85384F016 for ; Fri, 13 May 2022 08:07:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BDE85384F016 Received: by mail-wm1-x32e.google.com with SMTP id 129so4364294wmz.0 for ; Fri, 13 May 2022 01:07:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=Wyo6Mv3VYBT8vUURQiCw6N+lTvcRtM0c5ZjYYvwU9fU=; b=Y62lHqEC/UtosHz649Qvya8yXzkg61fbenu630DwH5dXksU4xMHgmA1G/N485JjF9H eJDi2fltSZV+gvCl7T3oMJQsfa0NoqNCeLnPagWulaQv2LFV+21uTf0fmN54CgaZb+xF vgbYLq32xMhZWM7J+o7W685ApSy/TZvPQcQePVETmCpNKpcCSPwSYaEgEkze/7IFz8K9 oPFJBgi1GygqTKwqH0OfbSMuRRQbU3ou4NJIHrK2hzslgNcsisuyN1Vj2SujjC30S6pm dEUnpnDINdKguWs4af/Q4aEoeg9naNMi5WFrdzPnxHH9CXKrfeSlnUHxFT+pMEl9mxup YEDw== X-Gm-Message-State: AOAM5322nj8v0s+z5e8a1cKZAdEuOtvdpqW/4v7hctj9ySMdutSQVBJL 9OC134a5oppTgmbqAtOR2FqeF5NBYPxxsw== X-Google-Smtp-Source: ABdhPJwOGVNCeulE4GvsZVaEiWZrAWzKoA6sk2smvb39wSjZb1cvGBSthOWMx9jXeMPtA3zfo8Xwhw== X-Received: by 2002:a05:600c:4808:b0:393:fbd3:f1fa with SMTP id i8-20020a05600c480800b00393fbd3f1famr13895891wmo.100.1652429254427; Fri, 13 May 2022 01:07:34 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id r21-20020adfb1d5000000b0020c5253d924sm1437327wra.112.2022.05.13.01.07.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 01:07:33 -0700 (PDT) Date: Fri, 13 May 2022 08:07:33 +0000 From: Pierre-Marie de Rodat To: gcc-patches@gcc.gnu.org Subject: [Ada] Fix the Ada 2022 iterated component association RM reference Message-ID: <20220513080733.GA2452483@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline X-Spam-Status: No, score=-13.2 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-List-Received-Date: Fri, 13 May 2022 08:07:37 -0000 --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Fix the error message pointing to the Ada reference section on mixed iterated component association being forbidden. Remove useless loop. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_aggr.adb (Resolve_Array_Aggregate): Fix ARM reference. Remove useless loop. --envbJBWh7q8WU6mo Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch.diff" diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -1833,7 +1833,7 @@ package body Sem_Aggr is or else No (Iterator_Specification (Assoc)) then Error_Msg_N ("mixed iterated component association" - & " (RM 4.4.3 (17.1/5))", + & " (RM 4.3.3 (17.1/5))", Assoc); return False; end if; @@ -1852,7 +1852,7 @@ package body Sem_Aggr is and then Present (Iterator_Specification (Assoc)) then Error_Msg_N ("mixed iterated component association" - & " (RM 4.4.3 (17.1/5))", + & " (RM 4.3.3 (17.1/5))", Assoc); return False; end if; @@ -1860,9 +1860,6 @@ package body Sem_Aggr is Next (Assoc); end loop; - while Present (Assoc) loop - Next (Assoc); - end loop; end if; Assoc := First (Component_Associations (N)); --envbJBWh7q8WU6mo--