autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Robert Dewar
Subject: Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
Date: Sat, 30 Dec 2006 08:14:20 -0500
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)

Richard Kenner wrote:
Not so appalling really, given that relying on wrapping is as has
been pointed out in this thread, the most natural and convenient way
of testing for overflow. It is really *quite* difficult to test for
overflow while avoiding overflow, and this is something that is
probably not in the lexicon of many C programmers.

I guess that's true even in GCC.  I looked at the OVERFLOW_SUM_SIGN macro in
fold-const.c.  But on the positive side, the test is isolated in one place
and so is easy to fix.

It would make sense as was suggested earlier to define standard library
routines or macros for overflow detection, and indeed this would be a
useful and appropriate addition to the standard

Moreover, as was said earlier in this thread, although it's hard to formally
define the subset, it's hard to see how any of the optimizations proposed
that take advantage of undefined overflow would, in pratice, actually break
this idiom.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]