Paul Eggert wrote:
> Compiling everything with -fwrapv is simple.  It has
> optimization drawbacks, but if that's the best we can do
> now, then we'll probably do it.  And once we do it, human
> nature suggests that we will generally not bother with the
> painstaking analysis needed to omit -fwrapv.

Certainly noone will try to analyze megabytes of source code in order to
someday be able to omit -fwrapv from the CFLAGS.

But if GCC would give a warning every time it does these optimizations which
are OK according to C99 but break LIA-1 assumptions, it would be manageable.
This way, programmers would have a chance to use 'unsigned int' instead of
'int' in those few places where it matters.

Such a warning should be simple to implement: Everywhere you use the value
of 'flag_wrapv' in a way that matters, give a warning. No?

Bruno

Reply via email to