mirror of
https://github.com/golang/go
synced 2024-11-02 11:50:30 +00: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 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
<!--{
|
<!--{
|
||||||
"Title": "The Go Programming Language Specification",
|
"Title": "The Go Programming Language Specification",
|
||||||
"Subtitle": "Version of May 3, 2017",
|
"Subtitle": "Version of May 9, 2017",
|
||||||
"Path": "/ref/spec"
|
"Path": "/ref/spec"
|
||||||
}-->
|
}-->
|
||||||
|
|
||||||
|
@ -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>
|
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>.
|
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
|
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.
|
The effect of converting between <code>Pointer</code> and <code>uintptr</code> is implementation-defined.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue