VHDL code for 4 bit binary division without using the division sign. Getting a warning that DIV.vhd(39): (vcom-1246) Range 3 to 0 is null
You should replace this line:

for i in 3 to 0 ....


with this:

for i in 3 downto 0 ....


The syntax for i in A to B you are using in your code, iterating from i=A to i=B incrementing the value at each iteration. It means, that if A &gt; B it will not work, since you can't go from A to B by incrementing. The syntax for going from A to B when A&gt;B is to use for i in A downto B. This way the value of i will decrement at each iteration starting from A and reaching B.