I use "-fno-strict-overflow" so it shouldn't be ub in any case. Also basically never use signed integers and I always use "checked" methods for doing aritmetic except performance critical loops.