mirror of
https://github.com/golang/go
synced 2024-11-26 18:16:48 -07:00
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 <mdempsky@google.com> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
541029636a
commit
86f5f7fdfa
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user