VHDL integer overflow in not taken `when` branch
This is to be expected since i-1 is potentially outside the index range for the array. Unfortunately you have to guard this case separately, the usual way to do it would be with an if ... generate statement.

some_loop: for i in 0 to 3 generate
    if i = 0 generate 
       ... 
    end generate;
    if i &gt; 0 generate 
       ... 
    end generate;
end generate some_loop;


A limitation of the if ... generate construct is that (before VHDL-2008) there is no else part. So you either need the unfortunately clumsy form above, or update to the latest ghdl release (0.33) for its much improved VHDL-2008 support, which allows you to replace the second if ... generate with an else.

If you are assigning every element of some array or record called something simultaneously, you may find this alternative style simpler and cleaner:

something(0) &lt;= '0';
some_loop: for i in 1 to 3 generate
    something(i) &lt;= foo(i-1, i-1);
end generate some_loop;