diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-11-23 23:30:32 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-12-15 06:41:51 -0500 |
commit | cb84595d3f406fb466c68e5ff6661dd8ee4a4e9c (patch) | |
tree | 6ce0044a11e184ca8474a32bf5fc83f27f6d4d4f | |
parent | f9c82ff43169fe5b1a192b71cbc50fd93b6e6a9c (diff) | |
download | gcc-cb84595d3f406fb466c68e5ff6661dd8ee4a4e9c.zip gcc-cb84595d3f406fb466c68e5ff6661dd8ee4a4e9c.tar.gz gcc-cb84595d3f406fb466c68e5ff6661dd8ee4a4e9c.tar.bz2 |
[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.
-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 7b6c66c..30fdfb8 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 -- |