From 041f8c70ad0e9cf0b40a3e51c444349bf00d35a3 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Mon, 23 Nov 2020 14:24:50 +0100 Subject: [PATCH] [Ada] Process Truncation just like other floating point attributes gcc/ada/ * sem_attr.adb (Analyze_Attribute): Merge similar code for Truncation and other floating point attributes. --- gcc/ada/sem_attr.adb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 847d863..b243af6 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -3402,6 +3402,7 @@ package body Sem_Attr is | Attribute_Machine_Rounding | Attribute_Model | Attribute_Rounding + | Attribute_Truncation | Attribute_Unbiased_Rounding => Check_Floating_Point_Type_1; @@ -6409,10 +6410,7 @@ package body Sem_Attr is -- Truncation -- ---------------- - when Attribute_Truncation => - Check_Floating_Point_Type_1; - Resolve (E1, P_Base_Type); - Set_Etype (N, P_Base_Type); + -- Shares processing with Ceiling attribute ---------------- -- Type_Class -- -- 2.7.4