On Friday, 13 November 2015 at 06:46:37 UTC, Ali Çehreli wrote:
Since it's UB in C and C++, I've heard that both clang and gcc do remove code branches if they can prove that there will be signed overflow. I don't know how or whether that optimization is turned off for D.Ali
Clang does it, but LLVM IR defines flags for overflow behavior and it is up to the frontend to choose which one it want to use.
