From 5a841af88be1ce4ff1c69cbb76a5033f2ceec3d6 Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Fri, 23 Sep 2022 17:14:52 +0200 Subject: [PATCH] ada: Do not issue compiler warnings in GNATprove mode 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. --- 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 0c3dd81..f85d091 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 -- 2.7.4