From: Ian Lance Taylor Date: Thu, 3 Feb 2022 20:43:48 +0000 (-0800) Subject: misc/cgo/test: disable unhelpful GCC warning X-Git-Tag: go1.18rc1~108 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=248ad855b7d0e49839b7b4281d9e60e222368583;p=gostls13.git misc/cgo/test: disable unhelpful GCC warning GCC 9 warns about a change in the ABI of passing structs with bitfields, but we don't care. Fixes #50987 Change-Id: Ica658d04172a42a7be788f94d31a714bb8c4766f Reviewed-on: https://go-review.googlesource.com/c/go/+/382956 Trust: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gopher Robot Reviewed-by: Benny Siegert Trust: Benny Siegert --- diff --git a/misc/cgo/test/test.go b/misc/cgo/test/test.go index dd81f770a2..109ef987f9 100644 --- a/misc/cgo/test/test.go +++ b/misc/cgo/test/test.go @@ -367,6 +367,11 @@ void init() { // Cgo incorrectly computed the alignment of structs // with no Go accessible fields as 0, and then panicked on // modulo-by-zero computations. + +// issue 50987 +// disable arm64 GCC warnings +#cgo CFLAGS: -Wno-psabi -Wno-unknown-warning-option + typedef struct { } foo;