]> Cypherpunks.ru repositories - gostls13.git/commit
[release-branch.go1.9] cmd/cgo: support large unsigned macro again
authorHiroshi Ioka <hirochachacha@gmail.com>
Thu, 31 Aug 2017 04:49:43 +0000 (13:49 +0900)
committerRuss Cox <rsc@golang.org>
Wed, 25 Oct 2017 20:23:52 +0000 (20:23 +0000)
commitdffc9319f187b8a993968833b3692fc31abbdf1e
tree64c185c654c39823d535129991b30219c1c1e2a9
parent33ce1682c7bd2d85d0f31c98d923b12c339d8a74
[release-branch.go1.9] cmd/cgo: support large unsigned macro again

The approach of https://golang.org/cl/43476 turned out incorrect.
The problem is that the sniff introduced by the CL only work for simple
expression. And when it fails it fallback to uint64, not int64, which
breaks backward compatibility.
In this CL, we use DWARF for guessing kind instead. That should be more
reliable than previous approach. And importanly, it fallbacks to int64 even
if it fails to guess kind.

Fixes #21708

Change-Id: I39a18cb2efbe4faa9becdcf53d5ac68dba180d47
Reviewed-on: https://go-review.googlesource.com/60510
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/60810
Reviewed-by: Hiroshi Ioka <hirochachacha@gmail.com>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Reviewed-on: https://go-review.googlesource.com/70970
Run-TryBot: Russ Cox <rsc@golang.org>
misc/cgo/test/cgo_test.go
misc/cgo/test/issue21708.go [new file with mode: 0644]
src/cmd/cgo/gcc.go
src/cmd/cgo/main.go