From patchwork Tue Jan 9 13:15:37 2024 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: 186367 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp99049dyi; Tue, 9 Jan 2024 05:17:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHKAVaYrdSUfhCJddRttgJd28MfxwIuRmmrQGdF2R108SKd5Ae+IJyhGAZmEMjvjxKoSPvf X-Received: by 2002:a05:622a:1888:b0:429:a05b:ef18 with SMTP id v8-20020a05622a188800b00429a05bef18mr1639145qtc.116.1704806252194; Tue, 09 Jan 2024 05:17:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704806252; cv=pass; d=google.com; s=arc-20160816; b=cJFAUOlSkCYt5qeT76IuB9/uD7w3d3VOLHFcStV/yKNM32iBI3HgpDi8B3sdI9/F61 98xWd/V3Zs8VjXpqCXJP/0NZKhLz31LYzEJtd/Lj3idcMPOhHaYebyRcYniscR5VeHTe gjnsBYVJKP3n/a1lzijCMtP7UO6rqt7iagn8uvGMt45Mkn4glETN1vdx1bdMf9umGpkY uVRiMs1G9rXnczAZYqmo4Fpo7SO0kKU/T1ljOLKyRVyCpL5KfqW313dFg58a74fnN442 TvMWLNB+Q5EcSJRYEQT7KPBUzYtnvGVcXGM3cT8k0J8z63L3pTq1LxG3rg4EJd1qRR/L 37Ag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=mbbOpBN5yWvlvt4VPPqhJh0uEhnxQxick/ZjG5x3KQU=; fh=QRb7QY4BZ0mIIAPiH2G4K0PcYKRtRn2i5A6VLUA8cN4=; b=Rxr+tjyvUVVIb3ybwGgop+sNRrkq36lzqjK0NMi5uBdFyDm3JyGpkx++QrgIxKuZaO eXoHvnBy0TEb3OWD5jRo0fBK65ZKkSbxyCBa6ULg1hdLhJtFE/1a2f3cqZnIB2cu8ubi ebDUgfxvdD4rLNSd027RPNj3E2L/vhCx+4yIlIXgN7VYRfJHxIVsFxfaN0C3q8J2EaKD 1w+wL7hzgUTy9J14+T6wZQFz+mHI8IdwkvbHG56FVa+JaW8eU4TfyoVM6JkMIba2C/x3 shMQuUVvDCJZhvjANZtIzCBajBF+a/ht00wnKr+dc/sPXwzDcqGCIYVYqMIlYx0rLdKP Bh3A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=APkKffdy; arc=pass (i=1); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id y15-20020ac85f4f000000b004297aa56dc3si2144821qta.496.2024.01.09.05.17.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 05:17:32 -0800 (PST) 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=@adacore.com header.s=google header.b=APkKffdy; arc=pass (i=1); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4AC303861018 for ; Tue, 9 Jan 2024 13:17:29 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 534EB3861804 for ; Tue, 9 Jan 2024 13:15:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 534EB3861804 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 534EB3861804 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704806146; cv=none; b=c/MhibZVBe44MSQ8YSq4RHBguF8sICRoh/49CKcNJCY+yg4JfE90I0ktprTska7CpPldrCXgGTteDvhwdI6M5rxdSmIzsGpV9UQMyYiWQ2S2T2ZSDKll/2s/X074ywa12SCHTmJ8gXeXbk4h/SKOzlxIUN/al2AIpb/TdCvFtb0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704806146; c=relaxed/simple; bh=VC6lBPVd+KJhwExa/aMn7YGyuK0IiZUtoa3bsOT1OOA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Zf1Wr3iR1ZHjUUjAUdkdDSbE+wXi4rW2cqRxwtbyh/mxjw1C8ueHXr7ZVxyhnkdJvHPE6ykh6oTXV5jdGgVeimhTt3UlnvDrT4jFBOoC3+7wqvRVHYYnAg6uKp35bDJAIb/w3DE51gl5mbgGr8W5jwK8Pv8q1Ew8NUXmqElUTRk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3376d424a79so1443170f8f.1 for ; Tue, 09 Jan 2024 05:15:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1704806138; x=1705410938; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=mbbOpBN5yWvlvt4VPPqhJh0uEhnxQxick/ZjG5x3KQU=; b=APkKffdyfJ0ItEq4nFdosLFB793Mpr9c+TTx+BYkP1CZHN5Jq196ENJEegS1twscsS 1apykUHco7dJ+B/0FMVZuazPT0qsDjlylK55gIgqjm1msLQ5nuYh2NDLKsh3isIupYer 8x2sjRb1kyiARjvCZAuL8eN3PojkGk4wYcNGolWkfg0zUUqsoEvbcUUnwczO6y1pdHkY dHspsmOI9dBJL5HFQsRxWMCieOxo+vF0VjqZZfWQDPkOhGoPhzzc+uixLBS/O/2/YxGF 9yenmZNfRjqLDnhv5oUIhV7TaNPo71tcEYT6ggoOeKWnvj0/lCpjgxeqUGz7lVZEzAqS g6Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704806138; x=1705410938; 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=mbbOpBN5yWvlvt4VPPqhJh0uEhnxQxick/ZjG5x3KQU=; b=j5yXefoWSjPTfU3hLXchDIMzNGaU+TGF1HZmQWsQ8cYW+TFnvIPCyjr5bRuB5hVqmN /H1/tiQoSnRvswqH/DXx9G+2PtzKQSo0pV+SQi3F/998R1exQPWoZsteT/+3nadeRn4C 1GXKVOE9J6di67rKO2+nbWmkK224Z9dvJlX7qBHqaaaXOxU3rAmmXBakyTesrfLYQAMl d3OkzDFc+IPeQgvWAaEQr5gxnRIF4O+6aPEIJBglyx34AEsqWZ7Pm71D0asHWY1RAHtf bR901uHlBG6U2VNfFDinxSmaacBIKe4ArKV4dQVOr6I+bRaCiSjRTor8FIIX12LR+ILj DieA== X-Gm-Message-State: AOJu0YxiM7rhq9Rat+Rd5XJfVnVPGlY30EcPMXGZywfCh9OGmwnh0nuq y0K4XsDZxgaHObkjGeOTNjXiQGmxlQ4ln2Bsu9BgZQUl8w== X-Received: by 2002:a05:600c:4e87:b0:40e:3be7:e828 with SMTP id f7-20020a05600c4e8700b0040e3be7e828mr2691976wmq.104.1704806138218; Tue, 09 Jan 2024 05:15:38 -0800 (PST) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id z11-20020a05600c0a0b00b0040d772030c2sm3578759wmp.44.2024.01.09.05.15.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 05:15:37 -0800 (PST) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED] ada: Fix uses of not Present Date: Tue, 9 Jan 2024 14:15:37 +0100 Message-ID: <20240109131537.744133-1-poulhies@adacore.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.6 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787618920648984309 X-GMAIL-MSGID: 1787618920648984309 From: Piotr Trojanek Fix style violation reported by GNATcheck. gcc/ada/ * sem_aggr.adb (Resolve_Container_Aggregate): Use "No". * sem_ch8.adb (Find_Direct_Name): Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_aggr.adb | 2 +- gcc/ada/sem_ch8.adb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index f586c18e655..d3d4c4a140f 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -3445,7 +3445,7 @@ package body Sem_Aggr is -- associations (Add_Unnnamed is not allowed), so we issue an -- error if there are positional associations. - if not Present (Comp_Assocs) + if No (Comp_Assocs) and then Present (Expressions (N)) then Error_Msg_N ("container aggregate must be " diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index fc2fec5f224..451a1b67fba 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -6745,7 +6745,7 @@ package body Sem_Ch8 is Id : Entity_Id := Gen_Trailer; begin loop - if not Present (Id) then + if No (Id) then -- E_Trailer presumably occurred -- earlier on the entity list than -- Gen_Trailer. So E preceded the