]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Justify false positive message from CodePeer analysis of GNAT
authorYannick Moy <moy@adacore.com>
Fri, 3 Dec 2021 15:23:01 +0000 (16:23 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 6 Jan 2022 17:11:32 +0000 (17:11 +0000)
gcc/ada/

* libgnat/s-exponu.adb (Exponu): Add annotation.

gcc/ada/libgnat/s-exponu.adb

index 06ed5099c2505dff4eb68bbb23f938f636b52753..2885d6b4f1942a5d0ab68f1c3c560487afb1fa7d 100644 (file)
@@ -64,6 +64,9 @@ begin
          pragma Loop_Invariant (Exp > 0);
          pragma Loop_Invariant (Result * Factor ** Exp = Left ** Right);
          pragma Loop_Variant (Decreases => Exp);
+         pragma Annotate
+           (CodePeer, False_Positive,
+            "validity check", "confusion on generated code");
 
          if Exp rem 2 /= 0 then
             pragma Assert