]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.11] cmd/cgo: disable GCC 9 warnings triggered by cgo code
authorIan Lance Taylor <iant@golang.org>
Mon, 28 Jan 2019 20:31:55 +0000 (12:31 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 1 Feb 2019 20:35:09 +0000 (20:35 +0000)
commite104ebfeabf575d9e33bb56decd6eceb40f041ce
treed3902184e3830b8758f59b5aeaf23fcdd3dbad66
parenteb0f2b3d27a896e4b832f2450490a2bbf72fbb6c
[release-branch.go1.11] 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 #29967

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: Bryan C. Mills <bcmills@google.com>
(cherry picked from commit f2a416b90ac68596ea05b97cefa8c72e7416e98f)
Reviewed-on: https://go-review.googlesource.com/c/160449
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/cgo/out.go