diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-11-23 23:28:46 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-12-15 06:41:51 -0500 |
commit | f9c82ff43169fe5b1a192b71cbc50fd93b6e6a9c (patch) | |
tree | a49b9178e69e9d87aae0621f3b0be353a7aab314 | |
parent | 4c11930d2e09a1efb0af65af8c14b1ad16a1f884 (diff) | |
download | gcc-f9c82ff43169fe5b1a192b71cbc50fd93b6e6a9c.zip gcc-f9c82ff43169fe5b1a192b71cbc50fd93b6e6a9c.tar.gz gcc-f9c82ff43169fe5b1a192b71cbc50fd93b6e6a9c.tar.bz2 |
[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.
-rw-r--r-- | gcc/ada/sem_attr.adb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 1eb4b81b..7b6c66c 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 -- |