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

Goto forbidden by Go #10

Open
dennwc opened this issue Jan 10, 2021 · 1 comment
Open

Goto forbidden by Go #10

dennwc opened this issue Jan 10, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@dennwc
Copy link
Contributor

dennwc commented Jan 10, 2021

Go has more strict rules regarding what goto jumps are valid.

cxgo currently doesn't reflow goto automatically. So "bad" goto will fail to compile in Go.

There is a workaround implemented in cxgo as one of the "ugly" ways to make the code compile. This workaround will completely flatten the code in a specified function.

We can try to implement a proper reflow algorithm, since those kind of goto statements are quite common.

@dennwc dennwc added the enhancement New feature or request label Jan 10, 2021
@TotallyGamerJet
Copy link
Contributor

Solving the structured control flow problem once and for all is a good article for anyone wanting to solve this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants