From 248ad855b7d0e49839b7b4281d9e60e222368583 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 3 Feb 2022 12:43:48 -0800 Subject: [PATCH] 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 --- misc/cgo/test/test.go | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.48.1