Re: why -> warning: array subscript is above array bounds

2015-05-29 Thread Jim Wilson
On 05/28/2015 12:41 PM, 田部 wrote: > gcc is, in this code, or put out a warning? > -O4 only??? -O3 and higher enables more aggressive loop unrolling. This happens in the pass_complete_unrolli function. With -O3 or higher, the inner loop is unrolled 12 times because the array size is 12. The arra

why -> warning: array subscript is above array bounds

2015-05-28 Thread 田部
Hi there I Japanese. Poor English. I like gcc. But, Why, gcc is, in this code, or put out a warning? -O4 only??? + cat -n bug.c 1#include 2intary[2][12] ; 3voidfunc(intx,int y) 4{ 5inti,j ; 6for(i = 0 ; i < x ; i++