From 57d5ceda2f8669bd36be135176e9e7ee416df7df Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Tue, 24 Nov 2020 00:00:17 +0100 Subject: [Ada] Refactor repeated code for fixed point attributes gcc/ada/ * sem_attr.adb (Analyze_Attribute): Consistently call Check_Fixed_Point_Type before checking the number of attribute expressions (like it is done for floating point types); reuse Check_Fixed_Point_Type_0. --- gcc/ada/sem_attr.adb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 58cb92f..0771961 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -4112,8 +4112,8 @@ package body Sem_Attr is ----------------- when Attribute_Fixed_Value => - Check_E1; Check_Fixed_Point_Type; + Check_E1; Resolve (E1, Any_Integer); Set_Etype (N, P_Base_Type); @@ -6035,8 +6035,7 @@ package body Sem_Attr is when Attribute_Small_Denominator | Attribute_Small_Numerator => - Check_E0; - Check_Fixed_Point_Type; + Check_Fixed_Point_Type_0; Set_Etype (N, Universal_Integer); ------------------ -- cgit v1.1