From f244e994b5ff5b6499a30171b4716f1a6983d6d8 Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Mon, 5 Sep 2022 16:19:36 +0200 Subject: [PATCH] [Ada] Justify false alarm from CodePeer analysis of GNAT Branch is determined as dead following a test always False by CodePeer analysis, which is incorrect. Justify this false alarm with an appropriate pragma Annotate. gcc/ada/ * libgnat/s-imagei.adb (Image_Integer): Add justification. --- gcc/ada/libgnat/s-imagei.adb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/ada/libgnat/s-imagei.adb b/gcc/ada/libgnat/s-imagei.adb index 8997e3c5a751..c467777c7b02 100644 --- a/gcc/ada/libgnat/s-imagei.adb +++ b/gcc/ada/libgnat/s-imagei.adb @@ -177,6 +177,8 @@ package body System.Image_I is begin if V >= 0 then + pragma Annotate (CodePeer, False_Positive, "test always false", + "V can be positive"); S (1) := ' '; P := 1; pragma Assert (P < S'Last); -- 2.47.2