We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go version
$ go version go version devel +8f2db14cd3 Tue Nov 10 18:42:47 2020 +0000 linux/amd64
No. It was introduced in CL 258938.
Build the following:
package p // typedef struct { } T; import "C" //export F func F(C.T) {}
(There are other types for which the failure is the same, such as struct { int x[0]; }.)
struct { int x[0]; }
Successful build.
_cgo_export.c: In function ‘F’: _cgo_export.c:175:58: error: excess elements in struct initializer [-Werror] 175 | } __attribute__((__packed__, __gcc_struct__)) _cgo_a = {0}; | ^ _cgo_export.c:175:58: note: (near initialization for ‘_cgo_a.p0’)
Thanks to @cherrymui for tracking this down and creating the reproducer.
The text was updated successfully, but these errors were encountered:
Change https://golang.org/cl/269337 mentions this issue: cmd/cgo: fix initialization of empty argument types
cmd/cgo: fix initialization of empty argument types
Sorry, something went wrong.
f423d61
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
No. It was introduced in CL 258938.
What did you do?
Build the following:
(There are other types for which the failure is the same, such as
struct { int x[0]; }
.)What did you expect to see?
Successful build.
What did you see instead?
Thanks to @cherrymui for tracking this down and creating the reproducer.
The text was updated successfully, but these errors were encountered: