|
From: Philippe W. <phi...@sk...> - 2015-03-24 14:34:44
|
On Tue, 2015-03-24 at 14:25 +0100, Florian Krohm wrote: > On 23.03.2015 22:49, sv...@va... wrote: > > Author: philippe > > Date: Mon Mar 23 21:49:32 2015 > > New Revision: 15036 > > > > I'm seeing: > > m_transtab.c: In function 'unchain_in_preparation_for_deletion': > m_transtab.c:619:36: warning: array subscript is above array bounds > [-Warray-bounds] > oea->fixed[i] = oea->fixed[i+1]; > ^ Strange. I do not think that loop/logic was changed/impacted by 15036. Did the warning appear specifically with this revision ? What is the gcc version/platform ? I tried on a recent platform (gcc 4.9.2, Fedora 21, s390) after having added -Warray-bounds but no warning obtained. This looks however a false positive to me: n_fixed is the nr of elements initialised in the array. So, 0 .. n_fixed-1 can be used And the condition to stop the loop is i+1 < n_fixed. So, it looks to me that fixed[i+1] will be ok. It is also unclear how gcc can guess the relationship between n_fixed and the array bounds, unless it has understood the logic in OutEdgeArr__add. Philippe |