]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: use C exact-width integer types to represent Go types
authorPhilipp Stephani <phst@google.com>
Mon, 18 Mar 2019 20:13:17 +0000 (20:13 +0000)
committerIan Lance Taylor <iant@golang.org>
Mon, 18 Mar 2019 21:08:21 +0000 (21:08 +0000)
commit08751259b75ad88e1b65c0b1c1a76541b924dd9d
tree949b68ffe88f3d2dec7837f7e30f07b9d96666ae
parent7b916243d98e36a385da4086fd9dd57004f6e4ca
cmd/cgo: use C exact-width integer types to represent Go types

The exact-width integer types are required to use two’s complement
representation and may not have padding bits, cf. §7.20.1.1/1 in the C11
standard or https://en.cppreference.com/w/c/types/integer.  This ensures that
they have the same domain and representation as the corresponding Go types.

Fixes #29878

Change-Id: Ie8a51e91666dfd89731c7859abe47356c94ca1be
GitHub-Last-Rev: 546a2cc3f1e22dc282757f73c01c91b00899d911
GitHub-Pull-Request: golang/go#29907
Reviewed-on: https://go-review.googlesource.com/c/go/+/159258
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/cgo/test/cgo_test.go
misc/cgo/test/issue29878.go [new file with mode: 0644]
misc/cgo/test/issue29878export.go [new file with mode: 0644]
src/cmd/cgo/doc.go
src/cmd/cgo/gcc.go
src/cmd/cgo/out.go