Re: Question about missing array bounds check

2021-09-15 Thread Jonathan Wakely via Gcc
On Wed, 15 Sept 2021 at 10:02, Fredrik Hederstierna wrote: > > I have a question about array index bounds check that I do not fully > understand. This question belongs on the gcc-help mailing list instead. > Compiling the code below, I get warnings for out-of-bounds in one case, but > not the

Question about missing array bounds check

2021-09-15 Thread Fredrik Hederstierna via Gcc
I have a question about array index bounds check that I do not fully understand. Compiling the code below, I get warnings for out-of-bounds in one case, but not the other, also printf output gets different, but should be same? Maybe someone can explain what is going on, and if observed behavior is