From be890bf9638870500f855dada9e30982911e2505 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 28 Sep 2020 07:40:07 +0200 Subject: vhdl-evaluation: minor rewrite. --- src/vhdl/vhdl-evaluation.adb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/vhdl/vhdl-evaluation.adb') 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) -- cgit v1.2.3