From: Ralph Corderoy Date: Wed, 24 Jan 2018 00:27:01 +0000 (+0000) Subject: %(divide): Avoid SIGFPE on integer divide of INT_MIN by -1. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/5bc2777230cdc4cea23ff87df356af3fb0cfadf9?hp=5bc2777230cdc4cea23ff87df356af3fb0cfadf9 %(divide): Avoid SIGFPE on integer divide of INT_MIN by -1. Dividing by zero isn't the only cause of SIGFPE. fmttest -raw -format '%(num -2147483648) %(divide -1)' foo Also, add FIXME comment suggesting the user should be told of overflow rather than silently using zero as the result. ---