From: Robert Griesemer
Date: Tue, 23 Oct 2018 21:54:59 +0000 (-0700)
Subject: spec: refer to "run-time panic" rather than "exception" (cleanup)
X-Git-Tag: go1.12beta1~668
X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1e38ecdbbee983a049500102af9e50ee33b446a8;p=gostls13.git
spec: refer to "run-time panic" rather than "exception" (cleanup)
Fixes #28341.
Change-Id: If8ae844c9b5e843ce9229c0a555f7006426baed7
Reviewed-on: https://go-review.googlesource.com/c/144260
Reviewed-by: Rob Pike
---
diff --git a/doc/go_spec.html b/doc/go_spec.html
index b8e11e83a4..cc2bada913 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -1,6 +1,6 @@
@@ -3260,7 +3260,7 @@ var v, ok T1 = x.(T)
yields an additional untyped boolean value. The value of ok
is true
if the assertion holds. Otherwise it is false
and the value of v
is
the zero value for type T
.
-No run-time panic occurs in this case.
+No run-time panic occurs in this case.
@@ -3624,7 +3624,7 @@ For signed integers, the operations +
,
-
, *
, /
, and <<
may legally
overflow and the resulting value exists and is deterministically defined
by the signed integer representation, the operation, and its operands.
-No exception is raised as a result of overflow.
+Overflow does not cause a run-time panic.
A compiler may not optimize code under the assumption that overflow does
not occur. For instance, it may not assume that x < x + 1
is always true.