]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.10] cmd/cgo: don't report inconsistency error for incomplete...
authorIan Lance Taylor <iant@golang.org>
Wed, 18 Jul 2018 00:36:15 +0000 (17:36 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 7 Aug 2018 05:18:07 +0000 (05:18 +0000)
commit815e0f9755e6e2a0db9c36db1af6550c1f750d8e
treec48dd70875bb2b09b26de65010a2191294095d1a
parent4c77cb3087363f2ebab565bd2b46935749ca7dd2
[release-branch.go1.10] cmd/cgo: don't report inconsistency error for incomplete typedef

In CLs 122575 and 123177 the cgo tool started explicitly looking up
typedefs. When there are two Go files using import "C", and the first
one has an incomplete typedef and the second one has a complete
version of the same typedef, then we will now record a version of the
first typedef which will not match the recorded version of the second
typedef, producing an "inconsistent definitions" error. Fix this by
silently merging incomplete typedefs with complete ones.

Fixes #26430

Change-Id: I9e629228783b866dd29b5c3a31acd48f6e410a2d
Reviewed-on: https://go-review.googlesource.com/124575
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
(cherry picked from commit a371bc2dfdf1fe4166c83be1177fbecb03d8da53)
Reviewed-on: https://go-review.googlesource.com/128155
misc/cgo/test/issue26430.go [new file with mode: 0644]
misc/cgo/test/issue26430/a.go [new file with mode: 0644]
misc/cgo/test/issue26430/b.go [new file with mode: 0644]
src/cmd/cgo/main.go