public inbox for
 help / color / mirror / Atom feed
From: "Marc Poulhiès" <>
Cc: Yannick Moy <>
Subject: [COMMITED] ada: Do not issue compiler warnings in GNATprove mode
Date: Thu,  6 Oct 2022 11:27:34 +0200	[thread overview]
Message-ID: <> (raw)

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.


	* 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

                 reply	other threads:[~2022-10-06  9:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).