nikic wrote: > > Shouldn't plain `-fsanitize=undefined` disable this sanitizer by default > > (requiring explicit opt-in)? In `-fwrapv` mode this is not undefined > > behavior, so `-fsanitize=undefined` should not complain about it. > > I was on the fence whether `-fsanitize=undefined` should expand to > signed-integer-overflow: [#80089 > (comment)](https://github.com/llvm/llvm-project/pull/80089#issuecomment-1945202620) > > Perhaps you have run into some convenience issues? #85501 for the > signed-integer-overflow suppresion.
I don't use `-fwrapv` myself, so this is more a philosophical consideration. It seems wrong to me for `-fsanitize=undefined` to report something as undefined behavior which is not undefined behavior in the used language dialect. `-fsanitize=undefined` already has a lot of checks that are conditioned on the used language dialect, so excluding the signed overflow case in particular from that general approach it is a bit odd. Thanks for putting up the patch! https://github.com/llvm/llvm-project/pull/82432 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits