From: Yannick Moy Date: Fri, 23 Sep 2022 15:14:52 +0000 (+0200) Subject: ada: Do not issue compiler warnings in GNATprove mode X-Git-Tag: basepoints/gcc-14~4094 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a841af88be1ce4ff1c69cbb76a5033f2ceec3d6;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 0c3dd8152637..f85d0919e7b6 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