mirror of
https://github.com/golang/go
synced 2024-11-23 05:50:05 -07:00
spec: clarify alignment of arrays
Fixes #18950. Change-Id: I9f94748f36a896bcadc96f0642eb1f3bff387950 Reviewed-on: https://go-review.googlesource.com/36481 Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
3e366ec6a7
commit
e62aab1274
@ -1,6 +1,6 @@
|
|||||||
<!--{
|
<!--{
|
||||||
"Title": "The Go Programming Language Specification",
|
"Title": "The Go Programming Language Specification",
|
||||||
"Subtitle": "Version of February 6, 2017",
|
"Subtitle": "Version of February 7, 2017",
|
||||||
"Path": "/ref/spec"
|
"Path": "/ref/spec"
|
||||||
}-->
|
}-->
|
||||||
|
|
||||||
@ -6468,7 +6468,7 @@ The following minimal alignment properties are guaranteed:
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>For a variable <code>x</code> of array type: <code>unsafe.Alignof(x)</code> is the same as
|
<li>For a variable <code>x</code> of array type: <code>unsafe.Alignof(x)</code> is the same as
|
||||||
<code>unsafe.Alignof(x[0])</code>, but at least 1.
|
the alignment of a variable of the array's element type.
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user