From: Piotr Trojanek Date: Mon, 23 Nov 2020 22:28:46 +0000 (+0100) Subject: [Ada] Refactor repeated code for real type attributes returning booleans X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9c82ff43169fe5b1a192b71cbc50fd93b6e6a9c;p=gcc.git [Ada] Refactor repeated code for real type attributes returning booleans gcc/ada/ * sem_attr.adb (Analyze_Attribute): Merge identical code for Machine_Overflows and Machine_Rounds attributes. --- diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 1eb4b81bcb5..7b6c66c4b4a 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -4733,7 +4733,9 @@ package body Sem_Attr is -- Machine_Overflows -- ----------------------- - when Attribute_Machine_Overflows => + when Attribute_Machine_Overflows + | Attribute_Machine_Rounds + => Check_Real_Type; Check_E0; Set_Etype (N, Standard_Boolean); @@ -4757,10 +4759,7 @@ package body Sem_Attr is -- Machine_Rounds -- -------------------- - when Attribute_Machine_Rounds => - Check_Real_Type; - Check_E0; - Set_Etype (N, Standard_Boolean); + -- Shares processing with Machine_Overflows attribute ------------------ -- Machine_Size --