cmd/cgo: missing documentation about "dllexport" redeclaration problem on windows/arm64 #49721
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
Documentation
Issues describing a change to documentation.
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
In #46502, we observed build errors on
windows/arm64
due to redeclaration warnings about mismatcheddllexport
attributes.That was ultimately resolved by CL 327309, for which the commit message states:
However, we know from #19837 that user code does sometimes need to forward-declare C-exported Go functions, in order to pass the C wrappers as callbacks to other C functions. Absent a fix for that issue, the workaround applied in CL 327309 at least ought to be documented.
The only restriction currently documented for forward-declarations in the C preamble (https://pkg.go.dev/cmd/cgo@master#hdr-C_references_to_Go) is:
It does not say anything about avoiding forward-declarations, nor about a need to forward-declare functions exported by Go with any particular attributes or keywords.
The text was updated successfully, but these errors were encountered: