xxhash3
xxhash3 copied to clipboard
incorrect-looking // +build lines
I've been analyzing // +build usage in the Go ecosystem and turned up internal/cpu/init.go, which says:
// +build 386 !gccgo,amd64 !gccgo,amd64p32 !gccgo
It looks like the intent here was "(386 && !gccgo) || (amd64 && !gccgo) || (amd64p32 && !gccgo)", but the meaning is "386 || (!gccgo && amd64) || (!gccgo && amd64p32) || !gccgo", or equivalently "386 || !gccgo".
There are two ways to write the presumed intent. As one line:
// +build 386,!gccgo amd64,!gccgo amd64p32,!gccgo
or as two lines:
// +build 386 amd64 amd64p32
// +build !gccgo
Best, Russ