From patchwork Thu Oct 6 09:27:34 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: 1761 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp218361wrs; Thu, 6 Oct 2022 02:29:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM74jVndFbNFL/NZj268wqBJrxgVUQtCJmT+uaSmZe85ssSIqxGSkfMr8jxVh5QIzLWYQevT X-Received: by 2002:a05:6402:2141:b0:456:d714:17b6 with SMTP id bq1-20020a056402214100b00456d71417b6mr3710533edb.425.1665048549347; Thu, 06 Oct 2022 02:29:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665048549; cv=none; d=google.com; s=arc-20160816; b=0zpFn6d1ZiOoHJXHQcGWCZohjf6oSI2ayDpCZo7BgqIL+1LlHQhXKLu8lld3yL8e1n Ch7mxOK85mZSLTIfc1VxLnMlc6tGiBCRAbHOpj9BkX4QWwsUHsH7hhSo0b9VrSARWQGq 5G9ch4ZGPYIYRwYHbMD+shHuvXShNxjpyVFd+SRMtYJ7LbFcTNpvcT6VM1CyUwY+E2Ta hxM9GCTpV4rk0bGPLihB25xeUPo5PGzXawuocJzDDcK3ncpAqK+eh9FTWy2uDFZphoq7 RmU+K0BbBYOcmqNpfGwFJgZ/PA54rH25n6eHUaDTDUpXBlUBaNbBOMGDnGB4v2ubiury SGzQ== 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-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=1/ulyJPLilgbp/uw3J1n1CglZHY4BoWtyGlwQ/aBnOM=; b=b/Z+eD4EiPX5VSVb+gsyNlyrNdPi2WfTDgcIW5poub+pgJ+K5Nh2kS9SvFobardASu QYZTikW3m/098qQ76ttxRy3tJP3ZPOyTtwhHVf8cb3QKi5e4MFbOcW30lRUopXmcy0Xl DMDGccMyuBQ+C1r/IfmUmHgKx6SHEXWgJ208AgnLQCLwi5e61STriDF6aWYXu5mMbCl+ wrCI3P68IHdiJxwMpknR04oVuevaVAM8nIH+A79QcT744w4uvVqrKzxh1PujDTlQwaVD zWgtctOOX3SMN41+b070J16PmtHvhrLcHFkIDH8QpH1kBkTK2dADMdujySg1KSAgTYOP PZkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=K+8mSLur; 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 z6-20020a056402274600b00457f5aa9dc6si21416864edd.528.2022.10.06.02.29.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Oct 2022 02:29:09 -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=K+8mSLur; 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 875313839DEC for ; Thu, 6 Oct 2022 09:28:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 875313839DEC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665048535; bh=1/ulyJPLilgbp/uw3J1n1CglZHY4BoWtyGlwQ/aBnOM=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=K+8mSLurcz7MRTdq1fKNxocTFRYfd5XPG1oyEq2d30pkiVHB4r/kG+wNSix4GtMcO ms5VyTXnLcj+iRQfoPrfPhCjcsXgMHbB1OlTQ4lrEh2fqom9vK8kmIMtwl/I8G+yVc n/6x5xipbuReJDpyMY2bbmZemfQqg8PdiC8TOTJM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 4F71C384B81F for ; Thu, 6 Oct 2022 09:27:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4F71C384B81F Received: by mail-wr1-x434.google.com with SMTP id a10so1731405wrm.12 for ; Thu, 06 Oct 2022 02:27:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=1/ulyJPLilgbp/uw3J1n1CglZHY4BoWtyGlwQ/aBnOM=; b=6UaQ02yahHH2KSkWuDcNtNvYE2go3tVcKV+DYpjJyPHFKMehsc+sMbxGt6YNA27Z6G wc8t6G9gQZDlRFjXZI9f9liVuolvAIG6CnzaNYX8bFS7bS+T6gDj5J8XZKQEmaJf3DT5 TqBhW8ZekG8Mk5KXLp4RvURf9HXYGZFQp+5zhZsvT7I1uPTEFQ0CmlndTH6PwVe4r9Hh ym72EdUnDuCEJD9cRcBiIafSts1qj5hSMmqObRLA6MFtT0ya7wIrkKiYPqyZDvmU4ePN D15J5IZ4tGAREIZGbnaz3MG7eFoNFp+aje0Qr+xLBt9s9Xdwg4d8LYvT5d+y94usXyLw eYGA== X-Gm-Message-State: ACrzQf0lo4C58KaNl6Ysat7ohcxuMtmQiYQyhZgLZbD6neOkiaPKchg2 3M1QZjbaKgmolcYGDup8lstVq7T2URdxvHqk X-Received: by 2002:a05:6000:108a:b0:22e:5610:7987 with SMTP id y10-20020a056000108a00b0022e56107987mr2268437wrw.527.1665048466149; Thu, 06 Oct 2022 02:27:46 -0700 (PDT) Received: from poulhies-Precision-5550.lan (static-176-191-105-132.ftth.abo.bbox.fr. [176.191.105.132]) by smtp.gmail.com with ESMTPSA id bp22-20020a5d5a96000000b00228cd9f6349sm10456212wrb.106.2022.10.06.02.27.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Oct 2022 02:27:45 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [COMMITED] ada: Do not issue compiler warnings in GNATprove mode Date: Thu, 6 Oct 2022 11:27:34 +0200 Message-Id: <20221006092734.260579-1-poulhies@adacore.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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 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?= Cc: Yannick Moy 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?1745929947696003929?= X-GMAIL-MSGID: =?utf-8?q?1745929947696003929?= From: Yannick Moy Use of pragma Warning with a string literal to set warning switches, should not impact GNATprove which is not subject to these switches. gcc/ada/ * sem_prag.adb (Analyze_Pragma): Ignore one variant of pragma Warnings in GNATprove mode. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 0c3dd815263..f85d0919e7b 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -25731,6 +25731,13 @@ package body Sem_Prag is ("argument of pragma% must be On/Off or static string " & "expression", Arg1); + -- Use of pragma Warnings to set warning switches is + -- ignored in GNATprove mode, as these switches apply to + -- the compiler only. + + elsif GNATprove_Mode then + null; + -- One argument string expression case else