From patchwork Mon Sep 5 07:25:58 2022 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: 977 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp58532wrt; Mon, 5 Sep 2022 00:35:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR5TwKmxmOfhqb8BoYND3scIhBt0QtETwFWgDkFVa3asIGy+E0/MPudCNeRzgHdXeJVkS3pI X-Received: by 2002:aa7:cb92:0:b0:443:98d6:20da with SMTP id r18-20020aa7cb92000000b0044398d620damr41982191edt.399.1662363353277; Mon, 05 Sep 2022 00:35:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662363353; cv=none; d=google.com; s=arc-20160816; b=WURqaNz9FXg4r/hPARGbynwYZbi2MPZDvhVOf6H50B9xO+XUkLIej1MwFWiRDlDV6I 7z9chfntLy8zgyd6HwDimpiD5ul1UKki2Zwbc51pMPzTgfFz7i+62EOftEHQ2u/lRKNt JcOGjYYOBExHzBJG+nPWIiWsDF9tCR0MS5YNKcwz18y0Cl0hapL6PSAAGrq/mK1pHTyr DaLus0SbH1LY7kimPQWBs8z/VQSII9iet7I0iGCNGYVTzeLv75RVMSGYXbQu9D7JFrpv r8oWwNcGa/HrykUmlaRGaDNllx3BbnduVQojSjiiF7Nq8uRfhXPm4Vhr69FnejoQDTUk NlWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=pI8jYfvFQ0hICEqtaxH/CZSNQ56f1u76hIO8E+NO9io=; b=Alg4dVhI13JJflofPQ0Gswk8yXj3A4XhXxzBa5+j11zqbwM9AV0MyhBzVYK4IxKqRA x4qCXF5GzUJlKySCA/8SxHXOIpz0iZRIejtaspnkeJ6lDFCcd6nVN3XJVpDwFfN6anK+ dn+b7mvfswSssKKGCfE9v8Ez28N6iM7L1qQt3ODZKOgz8aAeJ2RfIdHxUp6QuooUzkER GMW2HbkfNjrce29Rizw2mCgbSiYBD4ILwoztnczFSEYnrJNF94nRdUVUlDTQ2alksmK6 Z4gj3Q7CdlP6BFY5DhBWEWC83qvq4qZCLZ+rN6pMAZMfVlChstKKEsCS56VS5RvAwr64 HTag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=uIvPlmSQ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id w25-20020a170906385900b00744aad5a1a6si5959772ejc.250.2022.09.05.00.35.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Sep 2022 00:35:53 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=uIvPlmSQ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 E3C09382DB20 for ; Mon, 5 Sep 2022 07:30:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E3C09382DB20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662363038; bh=pI8jYfvFQ0hICEqtaxH/CZSNQ56f1u76hIO8E+NO9io=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=uIvPlmSQ+eMLo5DJzCLciJFpSXb88p1djVG0LeQ2lU5BshUmWreKw5hxP/AQzGeS1 V6/JIPKp6tAkKpcOrMkB1T5CsDG73ehetIojxMP9AzzqpVPvkuFG8fsmJFL2fpiUWi OD9v17/BCebMhIlowJvbLPGUYYWTRk/WRHuludF0= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id 0FADB385AE4F for ; Mon, 5 Sep 2022 07:26:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0FADB385AE4F Received: by mail-wm1-x32f.google.com with SMTP id n17-20020a05600c501100b003a84bf9b68bso5140661wmr.3 for ; Mon, 05 Sep 2022 00:26:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date; bh=pI8jYfvFQ0hICEqtaxH/CZSNQ56f1u76hIO8E+NO9io=; b=vBqC53VNl/iaXTUNvAlOxQQiYo6CDZRHnOzxiT4t2U9BaSjVZp49SQSX+CPhlh1Pz0 TvZqN9620D0T7STCB9XuppVBONfzxDxYmz+GqCXcgBXuvqoL3ZQfXfNI2PDm5qzfaJ60 Tbt35Xdc7ETRzw1o9ATr/RomI/M5QiNSw+80GxVpM+nLlmyu/E2eob6ouNR5Etkuhij1 LliS9n49n7V0UZX8UL0IBC02HEVdNPxCoSw8tJaFc50HPmWf285VWSlDl1S2AWIa2chC yoKn1KAizTJQqMPICUUPd1i17kTro4BHDvF3tPkvvDScUdYWE+jinv68iaAthRggfhXq 64gg== X-Gm-Message-State: ACgBeo1KCsgB4Xy2azRp4FMTqUZLQk8egUKDyrSr/iRn+qFWP9IX50NE CBYVRnkOu7+tc3I4CvhDxgQyBc3eFrtWMA== X-Received: by 2002:a05:600c:3b05:b0:3a8:4c81:54df with SMTP id m5-20020a05600c3b0500b003a84c8154dfmr9970328wms.129.1662362759851; Mon, 05 Sep 2022 00:25:59 -0700 (PDT) Received: from poulhies-Precision-5550 (static-176-191-105-132.ftth.abo.bbox.fr. [176.191.105.132]) by smtp.gmail.com with ESMTPSA id r9-20020adff709000000b0022862fd933asm4538366wrp.96.2022.09.05.00.25.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Sep 2022 00:25:59 -0700 (PDT) Date: Mon, 5 Sep 2022 09:25:58 +0200 To: gcc-patches@gcc.gnu.org Subject: [Ada] Cleanup resolution of aggregates with mixed component associations Message-ID: <20220905072558.GA1174608@poulhies-Precision-5550> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-12.3 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: Marc =?iso-8859-1?q?Poulhi=E8s?= Cc: Piotr Trojanek 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?1743114315347459519?= X-GMAIL-MSGID: =?utf-8?q?1743114315347459519?= Code cleanup only; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_aggr.adb (Resolve_Array_Aggregate): Change an inconsistent use of False into its local equivalent Failure. 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 @@ -1926,7 +1926,7 @@ package body Sem_Aggr is and then No (Component_Associations (N)) and then not Null_Record_Present (N) then - return False; + return Failure; end if; -- Disable the warning for GNAT Mode to allow for easier transition. @@ -1966,7 +1966,7 @@ package body Sem_Aggr is Error_Msg_N ("mixed iterated component association" & " (RM 4.3.3 (17.1/5))", Assoc); - return False; + return Failure; end if; Next (Assoc); @@ -1985,7 +1985,7 @@ package body Sem_Aggr is Error_Msg_N ("mixed iterated component association" & " (RM 4.3.3 (17.1/5))", Assoc); - return False; + return Failure; end if; Next (Assoc);