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 ..."


On 2006-12-30 19:29:58 -0500, Robert Dewar wrote:
> 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.

I agree with you. And I doubt that GCC (or any compiler) could
reliably detect code that checks for overflow.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


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