Vincent Lefevre <vincent+gcc@xxxxxxxxxx> writes: > The -Warray-bounds warning occurs with: > > void t(unsigned int s) > { > arr1[f(s)] = 0; > arr1[f(s)] = 0; > } > > but not with: > > void t(unsigned int s) > { > arr1[f(s)] = 0; > } > > If "The warning triggers if there is some code path in which the index > is provably out of bounds." is the intended behavior (assuming that > the warning phrasing isn't really correct), isn't this proof the same > one in both cases? Why this difference in the gcc behavior? Sounds like a bug somewhere to me. The -Warray-bounds option is definitely optimization dependent, which is a flaw. Ian