cmd/cgo: generates incorrect int constants from #define with cast to ulong typedef with clang #46247
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
$ cat main.go
$ go run ./main.go
What did you expect to see?
Like on linux I would expect this output:
What did you see instead?
On MacOS Catalina (10.15.7) I get this output instead
the according generated code in
_cgo_gotypes.go
looks like this:so the cast seems to be ignored, if it is a typedef of
unsigned long
(orunsigned long long
).The text was updated successfully, but these errors were encountered: