Skip to content

Commit 86f5f7f

Browse files
committed
spec: clarify unsafe.Pointer conversions
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 <[email protected]> Reviewed-by: Russ Cox <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 5410296 commit 86f5f7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/go_spec.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--{
22
"Title": "The Go Programming Language Specification",
3-
"Subtitle": "Version of May 3, 2017",
3+
"Subtitle": "Version of May 9, 2017",
44
"Path": "/ref/spec"
55
}-->
66

@@ -5968,7 +5968,7 @@ <h3 id="Bootstrapping">Bootstrapping</h3>
59685968
<p>
59695969
Implementation restriction: <code>print</code> and <code>println</code> need not
59705970
accept arbitrary argument types, but printing of boolean, numeric, and string
5971-
<a href="#Types">types</a> must be supported.
5971+
<a href="#Types">types</a> must be supported.
59725972
</p>
59735973

59745974
<h2 id="Packages">Packages</h2>
@@ -6431,7 +6431,7 @@ <h3 id="Package_unsafe">Package <code>unsafe</code></h3>
64316431
A <code>Pointer</code> is a <a href="#Pointer_types">pointer type</a> but a <code>Pointer</code>
64326432
value may not be <a href="#Address_operators">dereferenced</a>.
64336433
Any pointer or value of <a href="#Types">underlying type</a> <code>uintptr</code> can be converted to
6434-
a <code>Pointer</code> type and vice versa.
6434+
a type of underlying type <code>Pointer</code> and vice versa.
64356435
The effect of converting between <code>Pointer</code> and <code>uintptr</code> is implementation-defined.
64366436
</p>
64376437

0 commit comments

Comments
 (0)