Robert Dewar <[EMAIL PROTECTED]> writes: > Of course there is a way out that satisfies both > sides here, and that is to declare that gcc code > should adhere to the standard *including* LIA > and then make sure the default mode of gcc is > LIA compliant.
Yes, this should solve the problem. The idea is that -O2 would assume wrapv semantics. It's fine with me if higher optimization levels disable -fwrapv by default. As I understand it the principal argument against this change is that the performance of some numeric programs would be adversely affected. But like you, I doubt whether it'd affect GCC's performance much, nor would it much affect the performance of glibc, coreutils, etc., etc. Also, as I understand it this change shouldn't affect gcc's SPEC benchmark scores, since they're typically done with -O3 or better.