]> Cypherpunks repositories - gostls13.git/commit
unsafe: document when Sizeof/Offsetof/Alignof are not constant
authorIan Lance Taylor <iant@golang.org>
Sat, 16 Jul 2022 22:51:25 +0000 (15:51 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 21 Jul 2022 23:05:01 +0000 (23:05 +0000)
commit2d655fb15a50036547a6bf8f77608aab9fb31368
tree950d1a97042ae53ecf77c8dd16695abb900d5034
parent076c3d7f077ff0f8d02675b66b9794bbff8d2147
unsafe: document when Sizeof/Offsetof/Alignof are not constant

They are not constant if their arguments have types that are variable size.

Fixes #53921

Change-Id: I2d46754c27f55a281331c099a11ea3cd85ec4e89
Reviewed-on: https://go-review.googlesource.com/c/go/+/417917
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Rob Pike <r@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/unsafe/unsafe.go