From 779e9dfd4d48b853b1406736b21965dd25f1ead5 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 30 Jan 2013 09:23:36 -0800 Subject: [PATCH] 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 --- doc/go1.1.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 -- 2.48.1