* [Ada] Remove hardcoded pragma Warnings from the formal vectors library
@ 2021-05-06 7:58 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-05-06 7:58 UTC (permalink / raw)
To: gcc-patches; +Cc: Piotr Trojanek
[-- Attachment #1: Type: text/plain, Size: 452 bytes --]
Pragma Warnings in the generic formal vectors library was only
suppressing a message in one specific instantiation within one specific
GNATprove test. This pragma was referring to "type T defined at line
4", which is exactly the type declared in that test; the suppression
didn't work for any other instantiations.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-cofove.adb (Insert_Space): Remove hardcoded pragma
Warnings.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 614 bytes --]
diff --git a/gcc/ada/libgnat/a-cofove.adb b/gcc/ada/libgnat/a-cofove.adb
--- a/gcc/ada/libgnat/a-cofove.adb
+++ b/gcc/ada/libgnat/a-cofove.adb
@@ -868,11 +868,7 @@ is
-- less than 0, so it is safe to compute the following sum without
-- fear of overflow.
- pragma Warnings
- (Off, "value not in range of type ""T"" defined at line 4");
Index := No_Index + Index_Type'Base (Count_Type'Last);
- pragma Warnings
- (On, "value not in range of type ""T"" defined at line 4");
if Index <= Index_Type'Last then
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-06 7:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 7:58 [Ada] Remove hardcoded pragma Warnings from the formal vectors library Pierre-Marie de Rodat
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).