public inbox for
 help / color / mirror / Atom feed
* [COMMITED] ada: Do not issue compiler warnings in GNATprove mode
@ 2022-10-06  9:27 Marc Poulhiès
  0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2022-10-06  9:27 UTC (permalink / raw)
  To: gcc-patches; +Cc: Yannick Moy

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-06  9:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-06  9:27 [COMMITED] ada: Do not issue compiler warnings in GNATprove mode Marc Poulhiès

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).