goplus / c2go

Convert C to Go
Apache License 2.0
307 stars 21 forks source link

panic: TODO: for condition has too many init statements #176

Closed visualfc closed 1 year ago

visualfc commented 1 year ago

main.c

#include <stdio.h>

int main() {
    for (int i = 0, j = 0; i < 5; ++i, j += 7)
    {
        printf("%d %d\n",i,j);
    }
    return 0;
}

c2go main.c

panic: TODO: for condition has too many init statements

goroutine 1 [running]:
github.com/goplus/gox.(*forStmt).Then(0xc0001b60c0?, 0xc00048d9a8?)
    pkg/mod/github.com/goplus/gox@v1.11.22/stmt.go:403 +0x1b6