]> Cypherpunks repositories - gostls13.git/commitdiff
spec: clarify unsafe.Pointer conversions
authorRobert Griesemer <gri@golang.org>
Fri, 28 Apr 2017 17:32:31 +0000 (10:32 -0700)
committerRobert Griesemer <gri@golang.org>
Tue, 9 May 2017 18:35:13 +0000 (18:35 +0000)
A pointer type of underlying type unsafe.Pointer can be used in
unsafe conversions. Document unfortunate status quo.

Fixes #19306.

Change-Id: I28172508a200561f8df366bbf2c2807ef3b48c97
Reviewed-on: https://go-review.googlesource.com/42132
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
doc/go_spec.html

index c0d0d2c2c0f99144d441c8a128d035a8f4ea4434..9a1cf0a0fead813b1fca29244185e6f79a437e89 100644 (file)
@@ -1,6 +1,6 @@
 <!--{
        "Title": "The Go Programming Language Specification",
-       "Subtitle": "Version of May 3, 2017",
+       "Subtitle": "Version of May 9, 2017",
        "Path": "/ref/spec"
 }-->
 
@@ -5968,7 +5968,7 @@ println    like print but prints spaces between arguments and a newline at the e
 <p>
 Implementation restriction: <code>print</code> and <code>println</code> need not
 accept arbitrary argument types, but printing of boolean, numeric, and string
-<a href="#Types">types</a> must be supported. 
+<a href="#Types">types</a> must be supported.
 </p>
 
 <h2 id="Packages">Packages</h2>
@@ -6431,7 +6431,7 @@ func Sizeof(variable ArbitraryType) uintptr
 A <code>Pointer</code> is a <a href="#Pointer_types">pointer type</a> but a <code>Pointer</code>
 value may not be <a href="#Address_operators">dereferenced</a>.
 Any pointer or value of <a href="#Types">underlying type</a> <code>uintptr</code> can be converted to
-a <code>Pointer</code> type and vice versa.
+a type of underlying type <code>Pointer</code> and vice versa.
 The effect of converting between <code>Pointer</code> and <code>uintptr</code> is implementation-defined.
 </p>