aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorYannick Moy <moy@adacore.com>2022-09-23 17:14:52 +0200
committerMarc Poulhiès <poulhies@adacore.com>2022-10-06 11:22:48 +0200
commit5a841af88be1ce4ff1c69cbb76a5033f2ceec3d6 (patch)
tree15d5a7b931c3e33d4a6a06bfe1394392c0eb6721 /gcc
parent7d8ba0c67cfb68e3a7806b30c3075d06e8feeb7c (diff)
downloadgcc-5a841af88be1ce4ff1c69cbb76a5033f2ceec3d6.zip
gcc-5a841af88be1ce4ff1c69cbb76a5033f2ceec3d6.tar.gz
gcc-5a841af88be1ce4ff1c69cbb76a5033f2ceec3d6.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_prag.adb7
1 files changed, 7 insertions, 0 deletions
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