cmd/cgo: _GoStringLen and _GoStringPtr implicitly declared when exporting Go function #71226
Labels
BugReport
Issues describing a possible bug in the Go implementation.
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Go version
go version go1.22.10 darwin/amd64
Output of
go env
in your module/workspace:What did you do?
I am writing an application that uses cgo. For this reason, I want to compile with all warnings as errors.
Here is a minimal reproducer:
What did you see happen?
Without the
//export foo
directive, it compiles without issue.What did you expect to see?
No errors.
The text was updated successfully, but these errors were encountered: