diff options
author | Yannick Moy <moy@adacore.com> | 2022-09-05 16:19:36 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2022-09-12 10:16:52 +0200 |
commit | f244e994b5ff5b6499a30171b4716f1a6983d6d8 (patch) | |
tree | 576e0a06752fc160ef7898df21a0e7cb00fc0ef0 /gcc | |
parent | 0f829a98d90105b8a117fac4869dfa0b2578cd6d (diff) | |
download | gcc-f244e994b5ff5b6499a30171b4716f1a6983d6d8.zip gcc-f244e994b5ff5b6499a30171b4716f1a6983d6d8.tar.gz gcc-f244e994b5ff5b6499a30171b4716f1a6983d6d8.tar.bz2 |
[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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/libgnat/s-imagei.adb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ada/libgnat/s-imagei.adb b/gcc/ada/libgnat/s-imagei.adb index 8997e3c..c467777 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); |