]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/test: disable unhelpful GCC warning
authorIan Lance Taylor <iant@golang.org>
Thu, 3 Feb 2022 20:43:48 +0000 (12:43 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 3 Feb 2022 22:55:24 +0000 (22:55 +0000)
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 <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Trust: Benny Siegert <bsiegert@gmail.com>

misc/cgo/test/test.go

index dd81f770a2070c299a8ca4343bcd3dacb0ff0f8c..109ef987f93023a4bba79219fecd74c9eeb2ab07 100644 (file)
@@ -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;