aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-evaluation.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/vhdl-evaluation.adb')
-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)