aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-05-23 18:33:44 +0200
committerTristan Gingold <tgingold@free.fr>2019-05-23 18:33:44 +0200
commit7cdf0ab35669516ea520b0d5ac783384f641e551 (patch)
tree27069149bc68c92952987f92fe1e558bb99b1e48
parent14df69adffe49d3f5dc1545c71b25d719500ca7b (diff)
downloadghdl-7cdf0ab35669516ea520b0d5ac783384f641e551.tar.gz
ghdl-7cdf0ab35669516ea520b0d5ac783384f641e551.tar.bz2
ghdl-7cdf0ab35669516ea520b0d5ac783384f641e551.zip
trans-chap3: improve style.
-rw-r--r--src/vhdl/translate/trans-chap3.adb5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vhdl/translate/trans-chap3.adb b/src/vhdl/translate/trans-chap3.adb
index 8c3021d43..c09203252 100644
--- a/src/vhdl/translate/trans-chap3.adb
+++ b/src/vhdl/translate/trans-chap3.adb
@@ -341,13 +341,12 @@ package body Trans.Chap3 is
Get_Subtype_Definition (Get_Type_Declarator (Def));
L, H : Iir;
Lv, Hv : Int64;
+ subtype Int64_32 is Int64 range -(2 ** 31) .. 2 ** 31 - 1;
begin
Get_Low_High_Limit (Get_Range_Constraint (St), L, H);
Lv := Get_Value (L);
Hv := Get_Value (H);
- if Lv in -(2 ** 31) .. 2 ** 31 - 1
- and then Hv in -(2 ** 31) .. 2 ** 31 - 1
- then
+ if Lv in Int64_32 and then Hv in Int64_32 then
return Precision_32;
else
if Translation.Flag_Only_32b then