aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-09-28 07:40:07 +0200
committerTristan Gingold <tgingold@free.fr>2020-09-28 19:07:51 +0200
commitbe890bf9638870500f855dada9e30982911e2505 (patch)
treef5dfb32074941040f55e1c258da2e4000ac6898a /src
parent33a3d46d465e2e4034ae6c9989e97b86fe7cadcb (diff)
downloadghdl-be890bf9638870500f855dada9e30982911e2505.tar.gz
ghdl-be890bf9638870500f855dada9e30982911e2505.tar.bz2
ghdl-be890bf9638870500f855dada9e30982911e2505.zip
vhdl-evaluation: minor rewrite.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/vhdl-evaluation.adb10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vhdl/vhdl-evaluation.adb b/src/vhdl/vhdl-evaluation.adb
index 0784c706e..76f8c7fec 100644
--- a/src/vhdl/vhdl-evaluation.adb
+++ b/src/vhdl/vhdl-evaluation.adb
@@ -3663,13 +3663,13 @@ package body Vhdl.Evaluation is
function Eval_Check_Bound (Expr : Iir; Sub_Type : Iir) return Boolean is
begin
-- Note: use True not to repeat a message in case of overflow.
- if not Eval_Is_In_Bound (Expr, Sub_Type, True) then
- Warning_Msg_Sem (Warnid_Runtime_Error, +Expr,
- "static expression violates bounds");
- return False;
- else
+ if Eval_Is_In_Bound (Expr, Sub_Type, True) then
return True;
end if;
+
+ Warning_Msg_Sem (Warnid_Runtime_Error, +Expr,
+ "static expression violates bounds");
+ return False;
end Eval_Check_Bound;
procedure Eval_Check_Bound (Expr : Iir; Sub_Type : Iir)