On 19/04/16 22:00, Mark Thompson wrote: > On 19/04/16 20:45, Luca Barbato wrote: >> ... >> - *f->adaptcoeffs = ((res & ((~0UL) << 31)) ^ ((~0UL) << 30)) >> >> >> + *f->adaptcoeffs = ((res & (int)((~0UL) << 31)) ^ >> (int)((~0UL) << 30)) >> > > (int)((~0UL) << 31) is signed integer overflow and therefore undefined > behaviour.
clang seems happy though (and that's how the whole thing started...) > This is trying to choose between two values depending on whether the sign bit > of a 32-bit int is set or not? Seems so. > Maybe just remove all the overly-clever shifting and write a conditional. It > would also be clearer what's going on. Might be a better idea, indeed. lu _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
