On 17/11/2015 13:04, Peter Maydell wrote: > > Using -fwrapv means that integer signed overflow is fully defined: > > it wraps. When -fwrapv is used, there is no difference between > > -fstrict-overflow and -fno-strict-overflow for integers. > > I thought this too, but note that it says "for integers". As Laszlo > says, the reason to provide both is to get the -fno-strict-overflow > behaviour for pointer arithmetic, which is not affected by -fwrapv.
And ubsan is not affected by -fno-strict-overflow... Paolo