]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: silence unaligned-access
authorEgon Elbre <egonelbre@gmail.com>
Fri, 8 Sep 2023 08:17:59 +0000 (11:17 +0300)
committerGopher Robot <gobot@golang.org>
Fri, 8 Sep 2023 22:57:46 +0000 (22:57 +0000)
commit2fe2f0854293e601bac60bb5d3aa6e276fadf084
tree2dffcfa04ab3bd5f58bd75d09f4576420c174ff4
parent2e7e1d2e8d96ddf2aff00feb645cfa94bc9e4786
cmd/cgo: silence unaligned-access

Clang 14+ introduced a warning when using mixed packed and unpacked structs.
This can cause problems when taking an address of the unpacked struct, which
may end up having a different alignment than expected.

This is not a problem in cgo, which does not take pointers from the packed
struct.

Fixes #62480

Change-Id: If5879eea5e1b77bc6dc7430f68f8c916bff9b090
Reviewed-on: https://go-review.googlesource.com/c/go/+/526915
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/cgo/out.go