[Bug c/30475] assert(int+100 > int) optimized away

2007-01-21 Thread andreas at andreas dot org
--- Comment #31 from andreas at andreas dot org 2007-01-21 12:23 --- And who will go over the existing millions lines of code, and verify the overflow checks everywhere? Or add -fwrapv to all the Makefiles for unaidited code? Obviously not you. It seems to be easier to pretend you&#x

[Bug c/30475] assert(int+100 > int) optimized away

2007-01-21 Thread andreas at andreas dot org
--- Comment #32 from andreas at andreas dot org 2007-01-21 12:49 --- Oh, and besides, proper range analysis could optimize the above code, even in the presence of correct (and I mean LIA-1) overflow behaviour of signed ints. It seems you still didn't even manage to come up wi

[Bug c/30475] assert(int+100 > int) optimized away

2007-01-21 Thread andreas at andreas dot org
--- Comment #35 from andreas at andreas dot org 2007-01-21 17:29 --- (In reply to comment #34) > > The range analysis has nothing to do with just assuming integers can't wrap. > Partly wrong, range analysis is helped by the fact assuming integers can't > wrap. A

[Bug c/30475] assert(int+100 > int) optimized away

2007-01-22 Thread andreas at andreas dot org
--- Comment #47 from andreas at andreas dot org 2007-01-22 18:36 --- It was suggested to me that this issue should be discussed on the mailing list. If you have an opinion, come there. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30475

[Bug c/30475] assert(int+100 > int) optimized away

2007-01-22 Thread andreas at andreas dot org
--- Comment #51 from andreas at andreas dot org 2007-01-22 23:10 --- Sure, new security checks can be written in a compliant manner. But what plan do you suggest to find instances of non-compliant overflow checking in the existing body? Think something like a whole Linux distribution