cxgo
cxgo copied to clipboard
Goto forbidden by Go
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.
Solving the structured control flow problem once and for all is a good article for anyone wanting to solve this issue