aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/atree.adb
diff options
context:
space:
mode:
authorGhjuvan Lacambre <lacambre@adacore.com>2021-08-12 15:05:23 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2021-10-01 06:13:38 +0000
commit3323aa7ee7dd0cd9364816c80afae31d0dc7b186 (patch)
tree4234de252ea55fff23ec680fe9dec538467aa86d /gcc/ada/atree.adb
parentddd1ab30e6cb24b574752e011e2b798525bf4ef5 (diff)
downloadgcc-3323aa7ee7dd0cd9364816c80afae31d0dc7b186.zip
gcc-3323aa7ee7dd0cd9364816c80afae31d0dc7b186.tar.gz
gcc-3323aa7ee7dd0cd9364816c80afae31d0dc7b186.tar.bz2
[Ada] Fix CodePeer warnings
gcc/ada/ * atree.adb (Print_Statistics): Help CodePeer see Total as greater than zero. * gen_il-gen.adb (One_Comp): Annotate Field_Table as Modified.
Diffstat (limited to 'gcc/ada/atree.adb')
-rw-r--r--gcc/ada/atree.adb4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb
index 5af4b13..ce92548 100644
--- a/gcc/ada/atree.adb
+++ b/gcc/ada/atree.adb
@@ -2503,6 +2503,10 @@ package body Atree is
Total := G_Total + S_Total;
end loop;
+ -- This assertion helps CodePeer understand that Total cannot be 0 (this
+ -- is true because GNAT does not attempt to compile empty files).
+ pragma Assert (Total > 0);
+
Write_Int_64 (Total);
Write_Str (" (100%) = ");
Write_Int_64 (G_Total);