* David Brown: > I am guessing that this transformation is being done on internal > representation of the code - but I don't know the details of how these > work in gcc. (One day, I'd love to have the time to learn.) It might > well be that there is no way in that representation to request that > these multiplies be two's complement wrapping when the main context is > UB overflow. If that's the case, then I can understand how that > optimisation is not applied - but that would be a limitation of the > internal representation rather than a fundamental issue with the > optimisation. Yes, that's what I meant. It's a limitation of GCC's IR, I think. (Obviously no expert in this matter.) Thanks, Florian