aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2020-11-24 00:00:17 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2020-12-15 06:41:52 -0500
commit57d5ceda2f8669bd36be135176e9e7ee416df7df (patch)
tree9127e030e2952644b8a46c64608182ee7265228e /gcc
parent9c852dfb057c645e1dc1e29115e57062b878bdc5 (diff)
downloadgcc-57d5ceda2f8669bd36be135176e9e7ee416df7df.zip
gcc-57d5ceda2f8669bd36be135176e9e7ee416df7df.tar.gz
gcc-57d5ceda2f8669bd36be135176e9e7ee416df7df.tar.bz2
[Ada] Refactor repeated code for fixed point attributes
gcc/ada/ * sem_attr.adb (Analyze_Attribute): Consistently call Check_Fixed_Point_Type before checking the number of attribute expressions (like it is done for floating point types); reuse Check_Fixed_Point_Type_0.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_attr.adb5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 58cb92f..0771961 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -4112,8 +4112,8 @@ package body Sem_Attr is
-----------------
when Attribute_Fixed_Value =>
- Check_E1;
Check_Fixed_Point_Type;
+ Check_E1;
Resolve (E1, Any_Integer);
Set_Etype (N, P_Base_Type);
@@ -6035,8 +6035,7 @@ package body Sem_Attr is
when Attribute_Small_Denominator
| Attribute_Small_Numerator
=>
- Check_E0;
- Check_Fixed_Point_Type;
+ Check_Fixed_Point_Type_0;
Set_Etype (N, Universal_Integer);
------------------