Skip to content

cmd/cgo: mishandles 40 bit bitfield #22958

@ianlancetaylor

Description

@ianlancetaylor

Building this test case with go build foo.go

package p

/*
typedef struct {
	unsigned long x : 40;
} s;
*/
import "C"

var v C.s

produces

# command-line-arguments
/tmp/go-build300185653/b001/_cgo_gotypes.go:23:4: undefined: uint40

Oddly, something seems to be special about the number 40.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions