Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/cgo: synthesized _cgoCheckPointer calls weaken function calling type checking #16591
Trying to build this code:
The Go spec says function call arguments should be assignable to their corresponding parameters. But because of the explicit conversion introduced by cgo, this requirement is being relaxed from assignability to convertibility.
Probably not an issue in practice, but I noticed it while addressing mdempsky/unconvert#16.
I think we could address this by generating type-specific _cgoCheckPointer wrappers, but until we can inline calls to non-leaf functions, that might be undesirable.
It seems like we should fix this. It was broken in Go 1.7 so it's not terribly urgent, but the longer we wait the harder it is to fix. I don't really mind about having extra calls even without non-leaf inlining. OK to drop for Go 1.8 but if it's easy to fix, please do.