cmd/cgo: C code with function taking pointer typedef leads to C compiler warning #19832
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Building this file gets a warning from the C compiler:
The warning I see is:
The code generated by cgo looks like:
The C function expects
PS*
but we are passingstruct{int i;}*
. That is, we aren't using the typedef.Changing the Go code to use
C.PS(unsafe.Pointer(nil))
also fails in the same way.The text was updated successfully, but these errors were encountered: