1
0
mirror of https://github.com/golang/go synced 2024-11-14 15:30:54 -07:00
go/src/cmd/cgo
Hiroshi Ioka 7555a45dc2 cmd/cgo: support large unsigned macros
Currently, cgo converts integer macros into int64 if it's possible.
As a result, some macros which satisfy

math.MaxInt64 < x <= math.MaxUint64

will lose their original values.

This CL introduces the new probe to check signs,
so we can handle signed ints and unsigned ints separately.

Fixes #20369

Change-Id: I002ba452a82514b3a87440960473676f842cc9ee
Reviewed-on: https://go-review.googlesource.com/43476
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-05-17 14:42:29 +00:00
..
ast.go cmd/cgo: read source files once 2017-04-18 22:59:42 +00:00
doc.go
gcc.go cmd/cgo: support large unsigned macros 2017-05-17 14:42:29 +00:00
godefs.go
main.go cmd/cgo: support large unsigned macros 2017-05-17 14:42:29 +00:00
out.go cmd/cgo: avoid C++ style comments 2017-04-22 00:53:51 +00:00
util.go