On Fri, 20 Apr 2012, Ian Lance Taylor wrote:
> In Go, a division overflow is supposed to wrap. On x86 processors it
> would raise a SIGFPE signal leading to a panic. This patch fixes that
> problem as well.
It's a pity that this change is Go-specific. For -fwrapv, INT_MIN / -1
and INT_MIN % -
This patch to the Go compiler and runtime adds explicit checks for
division by zero and for division overflow (INT_MIN / -1).
In Go, a division by zero is supposed to produce a panic; that did not
happen on processors like PPC that do not issue a SIGFPE signal on
division by zero. This patch fixe