diff mbox series

[Ada] Remove CodePeer annotations for pragma Loop_Variant

Message ID 20220110094137.GA586124@adacore.com
State New
Headers show
Series [Ada] Remove CodePeer annotations for pragma Loop_Variant | expand

Commit Message

Pierre-Marie de Rodat Jan. 10, 2022, 9:41 a.m. UTC
Pragma Loop_Variant is now expanded into a null statement in CodePeer
mode. Remove annotations related to false positives in runtime units.

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

gcc/ada/

	* libgnat/s-exponn.adb, libgnat/s-expont.adb,
	libgnat/s-exponu.adb, libgnat/s-widthi.adb,
	libgnat/s-widthu.adb: Remove CodePeer annotations for pragma
	Loop_Variant.
diff mbox series

Patch

diff --git a/gcc/ada/libgnat/s-exponn.adb b/gcc/ada/libgnat/s-exponn.adb
--- a/gcc/ada/libgnat/s-exponn.adb
+++ b/gcc/ada/libgnat/s-exponn.adb
@@ -130,9 +130,6 @@  is
          pragma Loop_Invariant
            (Big (Result) * Big (Factor) ** Exp = Big (Left) ** Right);
          pragma Loop_Variant (Decreases => Exp);
-         pragma Annotate
-           (CodePeer, False_Positive,
-            "validity check", "confusion on generated code");
 
          if Exp rem 2 /= 0 then
             declare


diff --git a/gcc/ada/libgnat/s-expont.adb b/gcc/ada/libgnat/s-expont.adb
--- a/gcc/ada/libgnat/s-expont.adb
+++ b/gcc/ada/libgnat/s-expont.adb
@@ -130,9 +130,6 @@  is
          pragma Loop_Invariant
            (Big (Result) * Big (Factor) ** Exp = Big (Left) ** Right);
          pragma Loop_Variant (Decreases => Exp);
-         pragma Annotate
-           (CodePeer, False_Positive,
-            "validity check", "confusion on generated code");
 
          if Exp rem 2 /= 0 then
             declare


diff --git a/gcc/ada/libgnat/s-exponu.adb b/gcc/ada/libgnat/s-exponu.adb
--- a/gcc/ada/libgnat/s-exponu.adb
+++ b/gcc/ada/libgnat/s-exponu.adb
@@ -64,9 +64,6 @@  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


diff --git a/gcc/ada/libgnat/s-widthi.adb b/gcc/ada/libgnat/s-widthi.adb
--- a/gcc/ada/libgnat/s-widthi.adb
+++ b/gcc/ada/libgnat/s-widthi.adb
@@ -163,9 +163,6 @@  begin
          pragma Loop_Invariant (Pow = Big_10 ** (W - 2));
          pragma Loop_Invariant (Big (T) = Big (T_Init) / Pow);
          pragma Loop_Variant (Decreases => T);
-         pragma Annotate
-           (CodePeer, False_Positive,
-            "validity check", "confusion on generated code");
       end loop;
 
       declare


diff --git a/gcc/ada/libgnat/s-widthu.adb b/gcc/ada/libgnat/s-widthu.adb
--- a/gcc/ada/libgnat/s-widthu.adb
+++ b/gcc/ada/libgnat/s-widthu.adb
@@ -156,9 +156,6 @@  begin
          pragma Loop_Invariant (Pow = Big_10 ** (W - 2));
          pragma Loop_Invariant (Big (T) = Big (T_Init) / Pow);
          pragma Loop_Variant (Decreases => T);
-         pragma Annotate
-           (CodePeer, False_Positive,
-            "validity check", "confusion on generated code");
       end loop;
 
       declare