diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-09-28 07:40:07 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-09-28 19:07:51 +0200 |
commit | be890bf9638870500f855dada9e30982911e2505 (patch) | |
tree | f5dfb32074941040f55e1c258da2e4000ac6898a /src/vhdl | |
parent | 33a3d46d465e2e4034ae6c9989e97b86fe7cadcb (diff) | |
download | ghdl-be890bf9638870500f855dada9e30982911e2505.tar.gz ghdl-be890bf9638870500f855dada9e30982911e2505.tar.bz2 ghdl-be890bf9638870500f855dada9e30982911e2505.zip |
vhdl-evaluation: minor rewrite.
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/vhdl-evaluation.adb | 10 |
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) |