You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem. Thanks.
What steps will reproduce the problem?
$ cat > problem.go <<EOF
package main
/*
typedef struct private_struct *private_struct_t;
private_struct_t m(void) { return (private_struct_t) 0; }
private_struct_t identity(private_struct_t arg) { return arg; }
*/
import "C"
func main() {
s := C.m();
s = C.identity(s);
}
EOF
$ cgo problem.go
$ tail -10 problem.cgo4.c
void
_cgo_identity(void *v)
{
struct {
* p0;
private_struct_t r;
} *a = v;
a->r = identity(a->p0);
}
What is the expected output? What do you see instead?
The "p0" member of the anonymous struct in _cgo_identity should be of type
"private_struct_t".
What is your $GOOS? $GOARCH?
darwin amd64
Which revision are you using? (hg identify)
2b13a45c7c91 tip
Please provide any additional information below.
The text was updated successfully, but these errors were encountered:
by tonygarnockjones:
The text was updated successfully, but these errors were encountered: