Eduardo Bart

Results 53 issues of Eduardo Bart

Mixing statement expressions and `goto` gives an error, usually this works in GCC/Clang. Small test case: ```c int main() { int r = ({ int x; goto label; label: x;...

I am trying to use chibicc with some tool that generates C code with empty structs and I get some assertions when compiling, here is a small test case: ```c...

The following: ```c #define FOO(x) x FOO(long f()) { return 1; } ``` When doing `c2m t.c -E`, outputs: ```c longf() { return 1; } ``` `longf()` is incorrect, it...

The following test case: ```c #include struct foo { alignas(16) int myvar; }; int main() { return 0; } ``` Fails with: ``` test.c:2:1: syntax error on struct (expected ''):...

MIR text generated by C2M doesn't compile when using `INFINITY` macro Test case: ```c #include #include int main() { printf("%f\n", INFINITY); return 0; } ``` Output: ``` $ c2m -w...

I was testing some Linux APIs with C2M, like `epoll`, and I've got crashes, sadly I've noticed `epoll_event` uses `__attribute__((packed))` and this was the problem. I've trimmed down to the...

I've been able to run many C libraries using C2M, but there are some corner cases that are not possible because of some platform specific feature, such use atomics or...

I was comparing C2M compilation speed with GCC/Clang/TCC for compiling C2M itself, these are some numbers: ``` time gcc -std=gnu11 -Wno-abi -I. mir-gen.c c2mir/c2mir.c c2mir/c2mir-driver.c mir.c -ldl -lm -o a...

I will list here some functions that I miss in the API and keep updating as I need them, for start I will list some useful functions that I will...

key feature

I was reading @kripken slides and blog post about asyncify and I gave a shot on trying to implement a minimal coroutine system in pure C for WASM using it,...