-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/cgo: -Waddress-of-packed-member warnings popping up with gcc9 in cgo-gcc-prolog #29962
Comments
@gopherbot please open backport issues |
Backport issue(s) opened: #29966 (for 1.10), #29967 (for 1.11). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Change https://golang.org/cl/159859 mentions this issue: |
Change https://golang.org/cl/160449 mentions this issue: |
Change https://golang.org/cl/160450 mentions this issue: |
Change https://golang.org/cl/160777 mentions this issue: |
CL 159859 causes build failure with old clang versions (3.4.1) on FreeBSD 10.3/10.4. Update #29962 Update #27619 Change-Id: I78264ac5d8d17eeae89a982e89aac988eb22b286 Reviewed-on: https://go-review.googlesource.com/c/160777 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Change https://golang.org/cl/160779 mentions this issue: |
Change https://golang.org/cl/160780 mentions this issue: |
…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 f2a416b) Reviewed-on: https://go-review.googlesource.com/c/160449 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
…p pragmas CL 159859 causes build failure with old clang versions (3.4.1) on FreeBSD 10.3/10.4. Update #29962 Reviewed-on: https://go-review.googlesource.com/c/160777 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> (cherry picked from commit 6f4dc1c) Change-Id: Ie78d552ea6494fe3c4059847b26c2a6e206f9515 Reviewed-on: https://go-review.googlesource.com/c/160780 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
…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: Bryan C. Mills <bcmills@google.com> (cherry picked from commit f2a416b) Reviewed-on: https://go-review.googlesource.com/c/160450 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
…p pragmas CL 159859 causes build failure with old clang versions (3.4.1) on FreeBSD 10.3/10.4. Update #29962 Reviewed-on: https://go-review.googlesource.com/c/160777 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> (cherry picked from commit 6f4dc1c) Change-Id: Ia9e7fced5f0ae43fdad05c03ce14d37f23ff984c Reviewed-on: https://go-review.googlesource.com/c/160779 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
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 Fixes golang#29962 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>
CL 159859 causes build failure with old clang versions (3.4.1) on FreeBSD 10.3/10.4. Update golang#29962 Update golang#27619 Change-Id: I78264ac5d8d17eeae89a982e89aac988eb22b286 Reviewed-on: https://go-review.googlesource.com/c/160777 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
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 Fixes golang#29962 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>
CL 159859 causes build failure with old clang versions (3.4.1) on FreeBSD 10.3/10.4. Update golang#29962 Update golang#27619 Change-Id: I78264ac5d8d17eeae89a982e89aac988eb22b286 Reviewed-on: https://go-review.googlesource.com/c/160777 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
What version of Go are you using (
go version
)?observed with go1.10+(haven't went any further back) and gcc 9(and binutils-2.31.1) on Fedora rawhide(30)
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
go tool dist test -v -v -k or go test std
What did you expect to see?
tests passing
What did you see instead?
tests build failing due to werror, respectively due to Waddress-of-packed-member
or you can see only the warning triggered during the build/tests
I'm not sure if this is a real issue/bug or just adding the suppressive gcc pragma
// #pragma GCC diagnostic ignored "-Waddress-of-packed-member"
in to the generated CGo code will be the right solution.The text was updated successfully, but these errors were encountered: