Richard Kenner wrote:

I can't speak for any other GCC developer, but I personally am quite
comfortable viewing any code that assumes wrapping semantics as broken
and needing fixing with the exception of these cases of checking for
overflow: there simply is no good way in C to do these checks in a portable
manner and, as I said, I think we should make sure they continue to work
and maybe even document that.

Now that I don't like, Richard is recommending we write in some
undefined language where wraps sometimes work and sometimes
don't. That seems the worst of all worlds to me.

But also note that my position also is that we, as much as possible, should
allow these "broken" legacy codes to continue to work properly despite that
feeling, unless we have a specific case (such as the loop cases) where the
benefits of losing the optimization are quite high and the likelihood that
we'll break code is very low.

Yes, I agree with this

Reply via email to