public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Fix oversignt in genericized package System.Value_R
@ 2020-11-27  9:18 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2020-11-27  9:18 UTC (permalink / raw)
  To: gcc-patches; +Cc: Eric Botcazou

[-- Attachment #1: Type: text/plain, Size: 232 bytes --]

Pragma Annotate for CodePeer must immediately follow the designated line.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* libgnat/s-valuer.adb (Scan_Raw_Real): Move pragma Annotate around
	and adjust its parameters.

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 676 bytes --]

diff --git a/gcc/ada/libgnat/s-valuer.adb b/gcc/ada/libgnat/s-valuer.adb
--- a/gcc/ada/libgnat/s-valuer.adb
+++ b/gcc/ada/libgnat/s-valuer.adb
@@ -428,10 +428,10 @@ package body System.Value_R is
       --  First character can be either a decimal digit or a dot
 
       if Str (Index) in '0' .. '9' then
-         After_Point := False;
-
          pragma Annotate
-           (CodePeer, Intentional, "test always true", "defensive code below");
+           (CodePeer, False_Positive, "test always true", "defensive code");
+
+         After_Point := False;
 
          --  If this is a digit it can indicates either the float decimal
          --  part or the base to use.



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

only message in thread, other threads:[~2020-11-27  9:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-27  9:18 [Ada] Fix oversignt in genericized package System.Value_R 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).