Routine Get_Homonym_Number always returns a positive number. This is
explained in its comment and is evident from its body. No test attached,
because semantics is unaffected.
2019-09-18 Piotr Trojanek <trojanek@adacore.com>
gcc/ada/
* exp_dbug.ads, exp_dbug.adb (Get_Homonym_Number): Refine type
from Nat to Pos.
* sem_util.adb (Add_Homonym_Suffix): Refine type of a local
variable.
From-SVN: r275851
+2019-09-18 Piotr Trojanek <trojanek@adacore.com>
+
+ * exp_dbug.ads, exp_dbug.adb (Get_Homonym_Number): Refine type
+ from Nat to Pos.
+ * sem_util.adb (Add_Homonym_Suffix): Refine type of a local
+ variable.
+
2019-09-18 Yannick Moy <moy@adacore.com>
* exp_dbug.adb (Append_Homonym_Number): Use new function
-- Get_Homonym_Number --
------------------------
- function Get_Homonym_Number (E : Entity_Id) return Nat is
+ function Get_Homonym_Number (E : Entity_Id) return Pos is
H : Entity_Id := Homonym (E);
- Nr : Nat := 1;
+ Nr : Pos := 1;
begin
while Present (H) loop
-- Subprograms for Handling Qualification --
--------------------------------------------
- function Get_Homonym_Number (E : Entity_Id) return Nat;
+ function Get_Homonym_Number (E : Entity_Id) return Pos;
-- Return the homonym number for E, which is its position in the homonym
-- chain starting at 1. This is exported for use in GNATprove.
if Has_Homonym (U) then
declare
- N : constant Nat := Get_Homonym_Number (U);
+ N : constant Pos := Get_Homonym_Number (U);
S : constant String := N'Img;
begin
if N > 1 then