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
This commit is contained in:
Russ Cox 2013-01-30 09:23:36 -08:00
parent e579395905
commit 779e9dfd4d

View file

@ -14,6 +14,23 @@ TODO
TODO
<h3 id="divzero">Integer division by zero</h3>
<p>
In Go 1, integer division by a constant zero produced a runtime panic:
</p>
<pre>
func f(x int) int {
return x/0
}
</pre>
<p>
In Go 1.1, an integer division by constant zero is not a legal program, so it is a compile-time error.
</p>
<h2 id="impl">Changes to the implementations and tools</h2>
TODO: more