cxgo
cxgo copied to clipboard
Tool for transpiling C to Go.
add support for Windows
#66 was finished as result [Adding new header](https://github.com/gotranspile/cxgo/blob/main/CONTRIBUTING.md#adding-a-new-known-header) section of contributing guide should be updated
Possibly related to #10 Go enforces a syntactic reachability analysis for `return`s, while C never required that returns be reachable and C compilers which do reachability use more sophisticated algorighms....
## Source C code: ```c #include int global_int = 1; int main() { int value = 1; switch (value) { global_int++; case 1: printf("Case 1\n"); case 2: printf("Case 2\n"); break;...
## Source C code: ```c #include union TypePunning { int intValue; }; int main() { union TypePunning pun; pun.intValue = 1; pun.intValue =(int)1.23f; printf("Result: %d\n", pun.intValue); return 0; } ```...
Giving CxGo a hard time to explore this tool. ## Source C code: ```c #include int main() { int array3D[3][3][3]; int (*pArray3D)[3][3] = array3D; int i, j, k; for (...
## Input C code (test.c) ```c #include int globe = 35; int* fn1(int strd) { static int result; result = globe; if (strd > 2) { result += 4; }...
## Original C code ```c int main() { float local_float = 0.0f; local_float += (4 < 4.5) + 3; local_float += (4 < 4.5) + 3.5; return 0; } ```...
## Original C Code ```c int main() { float local_float = 0.0f; local_float += (4 < 4.5) + 3; local_float += (float)(4 < 4.5) + 3; return 0; } ```...