On Fri, Jun 03, 2005 at 03:26:19PM -0400, Bradley Lucier wrote: > Assuming that overflow of signed integer arithmetic wraps (and what gcc > flag do I have to set to assume this?) then here is the algorithm to > multiply x and y with overflow detection.
Cast to unsigned; we are guaranteed that unsigned arithmetic wraps.