From: Piotr Trojanek Date: Mon, 23 Nov 2020 22:30:32 +0000 (+0100) Subject: [Ada] Refactor repeated code for real type attributes returning integers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cb84595d3f406fb466c68e5ff6661dd8ee4a4e9c;p=gcc.git [Ada] Refactor repeated code for real type attributes returning integers gcc/ada/ * sem_attr.adb (Analyze_Attribute): Merge identical code for Machine_Radix and Mantissa attributes. --- diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 7b6c66c4b4a..30fdfb8c55d 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -4744,7 +4744,9 @@ package body Sem_Attr is -- Machine_Radix -- ------------------- - when Attribute_Machine_Radix => + when Attribute_Machine_Radix + | Attribute_Mantissa + => Check_Real_Type; Check_E0; Set_Etype (N, Universal_Integer); @@ -4775,10 +4777,7 @@ package body Sem_Attr is -- Mantissa -- -------------- - when Attribute_Mantissa => - Check_E0; - Check_Real_Type; - Set_Etype (N, Universal_Integer); + -- Shares processing with Machine_Radix attribute --------- -- Max --