Re: some integer undefined behaviors in gcc

2010-08-09 Thread Joseph S. Myers
On Mon, 9 Aug 2010, John Regehr wrote: > On Sat, 7 Aug 2010, Florian Weimer wrote: > > I wonder if we should give up and make -fwrapv the default. > > My sense is that there are not that many of these integer bugs, and probably > all of them are simple to fix. Best to just fix them and then run

Re: some integer undefined behaviors in gcc

2010-08-09 Thread Roberto Bagnara
On 08/09/10 08:42, John Regehr wrote: On Sat, 7 Aug 2010, Florian Weimer wrote: I wonder if we should give up and make -fwrapv the default. My sense is that there are not that many of these integer bugs, and probably all of them are simple to fix. Best to just fix them and then run a tool like

Re: some integer undefined behaviors in gcc

2010-08-08 Thread John Regehr
On Sat, 7 Aug 2010, Florian Weimer wrote: I wonder if we should give up and make -fwrapv the default. My sense is that there are not that many of these integer bugs, and probably all of them are simple to fix. Best to just fix them and then run a tool like ours every now and then to see if a

Re: some integer undefined behaviors in gcc

2010-08-08 Thread Florian Weimer
* Paolo Bonzini: >> There quite a few instances of the x & -x pattern, which would be fine >> with -fwrapv. > > It's always valid if you know that x is not INT_MIN, which you do in > many cases (for example if x is an offset). The reported cases cover the INT_MIN case (these are execution logs, n

Re: some integer undefined behaviors in gcc

2010-08-08 Thread Paolo Bonzini
On 08/08/2010 07:13 AM, Florian Weimer wrote: * Vincent Lefevre: On 2010-08-07 13:38:05 +0200, Florian Weimer wrote: * John Regehr: [...] Let me know if more detail is needed or if it would be better for me to file all 71 bug reports. I wonder if we should give up and make -fwrapv the defa

Re: some integer undefined behaviors in gcc

2010-08-08 Thread Florian Weimer
* Vincent Lefevre: > On 2010-08-07 13:38:05 +0200, Florian Weimer wrote: >> * John Regehr: > [...] >> > Let me know if more detail is needed or if it would be better for me to >> > file all 71 bug reports. >> >> I wonder if we should give up and make -fwrapv the default. > > Do you really mean th

Re: some integer undefined behaviors in gcc

2010-08-08 Thread Vincent Lefevre
On 2010-08-07 13:38:05 +0200, Florian Weimer wrote: > * John Regehr: [...] > > Let me know if more detail is needed or if it would be better for me to > > file all 71 bug reports. > > I wonder if we should give up and make -fwrapv the default. Do you really mean that all these integer overflows s

Re: some integer undefined behaviors in gcc

2010-08-07 Thread Florian Weimer
* John Regehr: > I ran gcc 162830 on x86 under a tool that checks for integer undefined > behaviors. The attached error messages show up when running "make > check" and when recompiling gcc. > > Each line in the attachment is an error message giving the problematic > operator, its srcloc, the typ

Re: some integer undefined behaviors in gcc

2010-08-04 Thread John Regehr
I think the messages are clear enough. You should probably wait a few days to let people comment and/or fix, and then file PRs. 1 per file seems to be the right granularity. Thanks Eric, that's what I'll do. John

Re: some integer undefined behaviors in gcc

2010-08-04 Thread Eric Botcazou
> I ran gcc 162830 on x86 under a tool that checks for integer undefined > behaviors. The attached error messages show up when running "make > check" and when recompiling gcc. > > Each line in the attachment is an error message giving the problematic > operator, its srcloc, the types of its operan