c4go
c4go copied to clipboard
strange usage of switch won't be able to be transpiled to Go
for example:
int i;
int x = /** some code */;
switch (x) {
case 0: for (i = 0; i < 3; i++) {
case 1: /** some code */;
case 2: /** some code */;
case 3: /** some code */; }
}
Hello,
Now, we can transpile C code only if we can compile C code.
Your code looks not good.
But, in that code strange for
in switch
. How you expect Go code?
But it does compile using gcc or clang.
发自我的iPhone
------------------ Original ------------------ From: Konstantin <[email protected]> Date: Mon,Jun 15,2020 10:32 PM To: Konstantin8105/c4go <[email protected]> Cc: Frozen-Tofu <[email protected]>, Author <[email protected]> Subject: Re: [Konstantin8105/c4go] strange usage of switch won't be able to be transpiled to Go (#484)
Hello, Now, we can transpile C code only if we can compile C code. Your code looks not good. But, in that code strange for in switch. How you expect Go code?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Ok, @Frozen-Tofu Fell free for create PR and implement the solution.
What the heck C?