* David Brown: > Are you able to give an example of the C code for which the > optimisation above applies, and values for which the result is > affected? (When thinking about overflows, I always like to use 16-bit > int because the numbers are smaller and easier to work with.) I think this code can turn something like (X * 3 - Y * 5) * 7 to X * 21 - Y * 35 Plug in X = 715827882 and Y = 429496729, then the original operation does not have an overflow (the difference is 1), but the transformed expression overflows on both 715827882 * 21 and 429496729 * 35. So this transformation is only correct for -fwrapv because it introduces overflow cases that are not present in the original expression. Thanks, Florian