Re: [PATCH][C] Change array size overflow check

2011-05-03 Thread Richard Guenther
On Mon, 2 May 2011, Joseph S. Myers wrote: > On Mon, 2 May 2011, Richard Guenther wrote: > > > We do have similar testcases in gcc.dg/large-size-array*.c, but not > > exactly testing the bound. The above testcase also complains with > > -pedantic about > > > > t.c:3:13: error: size of array 'a'

Re: [PATCH][C] Change array size overflow check

2011-05-02 Thread Joseph S. Myers
On Mon, 2 May 2011, Richard Guenther wrote: > We do have similar testcases in gcc.dg/large-size-array*.c, but not > exactly testing the bound. The above testcase also complains with > -pedantic about > > t.c:3:13: error: size of array 'a' is too large > t.c:4:1: error: overflow in constant expre

Re: [PATCH][C] Change array size overflow check

2011-05-02 Thread Richard Guenther
On Mon, 2 May 2011, Joseph S. Myers wrote: > On Mon, 2 May 2011, Richard Guenther wrote: > > > This changes the code that deals with too large array sizes to > > use int_fits_type_p instead of relying on the TREE_OVERFLOW setting > > of the tree folder. The latter will break once we don't treat

Re: [PATCH][C] Change array size overflow check

2011-05-02 Thread Joseph S. Myers
On Mon, 2 May 2011, Richard Guenther wrote: > This changes the code that deals with too large array sizes to > use int_fits_type_p instead of relying on the TREE_OVERFLOW setting > of the tree folder. The latter will break once we don't treat > sizetypes specially (and they keep being unsigned).

[PATCH][C] Change array size overflow check

2011-05-02 Thread Richard Guenther
This changes the code that deals with too large array sizes to use int_fits_type_p instead of relying on the TREE_OVERFLOW setting of the tree folder. The latter will break once we don't treat sizetypes specially (and they keep being unsigned). Bootstrapped and tested on x86_64-unknown-linux-gnu