cmd/cgo: "could not determine kind of name" for const int when using clang #21668
Compiling a trivial cgo program fails only with go1.9 on mac. It compiles on go1.8.3 for all platforms, and compiles for go1.9 on linux.
There are two files:
Note that if you change foo.h removing const it works.
What did you do?
What did you expect to see?
A successful build (or a more useful error message if you are not allowed to reference C.x, and preferably one that was consistent across platforms)
What did you see instead?
(CL 59710 was already cherry-picked as CL 59730, but then we wiped that out for the Go 1.9.1 security release behind Gerrit's back, and so Gerrit refuses to believe that we could possibly need a second cherry-pick of the same CL. CL 70849 is a cherry-pick but with the Change-Id incremented to break the Gerrit correspondence.)