This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]