Commit 396ff0df authored by Ian Lance Taylor's avatar Ian Lance Taylor Committed by Brad Fitzpatrick
Browse files

[release-branch.go1.10] cmd/cgo: disable GCC 9 warnings triggered by cgo code

GCC 9 has started emitting warnings when taking the address of a field
in a packed struct may cause a misaligned pointer. We use packed
structs in cgo to ensure that our field layout matches the C
compiler's layout. Our pointers are always aligned, so disable the warning

Updates #29962
Fixes #29966

Change-Id: I7e290a7cf694a2c2958529e340ebed9fcd62089c
Reviewed-on: https://go-review.googlesource.com/c/159859


Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
(cherry picked from commit f2a416b9)
Reviewed-on: https://go-review.googlesource.com/c/160450


Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent d4cf10b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment