Re: A question about detecting array bounds for case Warray-bounds-3.c

2011-09-28 Thread Dirk Müller
On Monday 26 September 2011, Matthew Gretton-Dann wrote: > As far as I understand it -Warray-bounds should be emitting a warning > for this case, but PR31227 seemed to be about removing these warnings. > > The PR comments do not explain why the array accesses are valid and I'm > hoping someone ca

Re: A question about detecting array bounds for case Warray-bounds-3.c

2011-09-26 Thread Matthew Gretton-Dann
...@gcc.gnu.org'; 'rgue...@gcc.gnu.org'; Matthew Gretton-Dann Subject: A question about detecting array bounds for case Warray- bounds-3.c Hi, For case gcc/testsuite/gcc.dg/Warray-bounds-3.c, obviously it is an invalid C program, because the last iterations of all the loops cause the acce

Re: A question about detecting array bounds for case Warray-bounds-3.c

2011-09-26 Thread Jonathan Wakely
;; 'muel...@gcc.gnu.org'; 'rgue...@gcc.gnu.org'; >> Matthew Gretton-Dann >> Subject: A question about detecting array bounds for case Warray- >> bounds-3.c >> >> Hi, >> >> For case gcc/testsuite/gcc.dg/Warray-bounds-3.c, obviously it is an >&g

RE: A question about detecting array bounds for case Warray-bounds-3.c

2011-09-26 Thread Jiangning Liu
Dann > Subject: A question about detecting array bounds for case Warray- > bounds-3.c > > Hi, > > For case gcc/testsuite/gcc.dg/Warray-bounds-3.c, obviously it is an > invalid C program, because the last iterations of all the loops cause > the access of arrays is bey

A question about detecting array bounds for case Warray-bounds-3.c

2011-09-21 Thread Jiangning Liu
Hi, For case gcc/testsuite/gcc.dg/Warray-bounds-3.c, obviously it is an invalid C program, because the last iterations of all the loops cause the access of arrays is beyond the max size of corresponding array declarations. The condition of checking upper bound should be "<" rather than "<=". Rig