On Sun, Oct 27, 2013 at 12:35:24PM +0100, Ondřej Bílka wrote: > On Sun, Oct 27, 2013 at 11:51:00AM +0100, Marek Polacek wrote: > > Or just wait till the integer overflow detection in ubsan is completed. > > > As these computations now are done on unsigned type which has behaviour > defined as modular arithmetic this would not help.
But what is integer overflow on unsigned type? If you want to add -1 in unsigned arithmetics, you add very large positive number instead and that would overflow, even if it is unlikely it is an error and it is pretty common. As part of ubsan or follow-up to that we probably want to add some builtins for these, the question is what semantics to implement. Jakub