From: Russ Cox Date: Wed, 30 Jan 2013 17:23:36 +0000 (-0800) Subject: doc/go1.1.html: document division by zero change from CL 6710045 X-Git-Tag: go1.1rc2~1241 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=779e9dfd4d48b853b1406736b21965dd25f1ead5;p=gostls13.git doc/go1.1.html: document division by zero change from CL 6710045 I am still not convinced this is a change we should make, but at least documenting it will keep us from forgetting it as we get closer to Go 1.1. R=golang-dev, minux.ma CC=golang-dev https://golang.org/cl/7226064 --- diff --git a/doc/go1.1.html b/doc/go1.1.html index 287f007fc4..32639ecbdb 100644 --- a/doc/go1.1.html +++ b/doc/go1.1.html @@ -14,6 +14,23 @@ TODO TODO +

Integer division by zero

+ +

+In Go 1, integer division by a constant zero produced a runtime panic: +

+ +
+func f(x int) int {
+	return x/0
+}
+
+ +

+In Go 1.1, an integer division by constant zero is not a legal program, so it is a compile-time error. +

+ +

Changes to the implementations and tools

TODO: more