vunit icon indicating copy to clipboard operation
vunit copied to clipboard

ModelSim issues warning regarding string_ops.vhd

Open nselvara opened this issue 1 year ago • 0 comments

Hello, when I run VUnit test the ModelSim spits out a warning regarding the string_ops The warning is: \vunit\vhdl\string_ops\src\string_ops.vhd(565): (vopt-1083) Implicit array operator "=" always returns FALSE (left length 1 is not equal to right length 0).

The flagged line of code is this: image

I think the if clause can be rewritten to:

if substring'length = 0 then
    return start_pos;
end if;

nselvara avatar Dec 19 '23 09:12 nselvara