Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/cgo: fails to generate certain types with Go 1.14 [1.14 backport] #37622

Closed
gopherbot opened this issue Mar 3, 2020 · 4 comments
Closed

cmd/cgo: fails to generate certain types with Go 1.14 [1.14 backport] #37622

gopherbot opened this issue Mar 3, 2020 · 4 comments

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Mar 3, 2020

@tklauser requested issue #37621 to be considered for backport to the next 1.14 minor release.

@gopherbot please consider this for backport to 1.14, it's a regression.

@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Mar 29, 2020

Change https://golang.org/cl/226341 mentions this issue: cmd/cgo, misc/cgo: only cache anonymous struct typedefs with parent name

@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Mar 30, 2020

Change https://golang.org/cl/226497 mentions this issue: [release-branch.go1.14] cmd/cgo, misc/cgo: only cache anonymous struct typedefs with parent name

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Mar 30, 2020

Approved because it is a regression, and it breaks generating the x/sys/unix files using Go 1.14.

gopherbot pushed a commit that referenced this issue Mar 30, 2020
…t typedefs with parent name

CL 181857 broke the translation of certain C types using cmd/cgo -godefs
because it stores each typedef, array and qualified type with their
parent type name in the translation cache.

Fix this by only considering the parent type for typedefs of anonymous
structs which is the only case where types might become ambiguous.

Fixes #37622

Change-Id: I301a749ec89585789cb0d213593bb8b7341beb88
Reviewed-on: https://go-review.googlesource.com/c/go/+/226341
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit a265c2c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/226497
@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Mar 30, 2020

Closed by merging cdd55a3 to release-branch.go1.14.

@gopherbot gopherbot closed this Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.