aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2021-10-13 13:48:42 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2021-10-20 10:17:04 +0000
commit2aa814cb27fe3f61adfe894d52f01a4c377263fe (patch)
treedf59411b2dbd0e309d0214eb06045d36ebed6594 /gcc
parent36e38022125f2f336e5d281fb3e5e66191d21e73 (diff)
downloadgcc-2aa814cb27fe3f61adfe894d52f01a4c377263fe.zip
gcc-2aa814cb27fe3f61adfe894d52f01a4c377263fe.tar.gz
gcc-2aa814cb27fe3f61adfe894d52f01a4c377263fe.tar.bz2
[Ada] Refine type of a counter function for record delta aggregate
gcc/ada/ * sem_aggr.adb (Variant_Depth): Refine type from Integer to Natural.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_aggr.adb9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index 527342f..e59a0e2 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