From: Piotr Trojanek Date: Wed, 13 Oct 2021 11:48:42 +0000 (+0200) Subject: [Ada] Refine type of a counter function for record delta aggregate X-Git-Tag: basepoints/gcc-13~3770 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aa814cb27fe3f61adfe894d52f01a4c377263fe;p=thirdparty%2Fgcc.git [Ada] Refine type of a counter function for record delta aggregate gcc/ada/ * sem_aggr.adb (Variant_Depth): Refine type from Integer to Natural. --- diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index 527342f32d11..e59a0e2ee689 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -3384,9 +3384,8 @@ package body Sem_Aggr is function Nested_In (V1 : Node_Id; V2 : Node_Id) return Boolean; -- Determine whether variant V1 is within variant V2 - function Variant_Depth (N : Node_Id) return Integer; - -- Determine the distance of a variant to the enclosing type - -- declaration. + function Variant_Depth (N : Node_Id) return Natural; + -- Determine the distance of a variant to the enclosing type declaration -------------------- -- Check_Variant -- @@ -3492,8 +3491,8 @@ package body Sem_Aggr is -- Variant_Depth -- ------------------- - function Variant_Depth (N : Node_Id) return Integer is - Depth : Integer; + function Variant_Depth (N : Node_Id) return Natural is + Depth : Natural; Par : Node_Id; begin