beluga
beluga copied to clipboard
a standard C compiler (with an integrated preprocessor)
To adopt optimizations, a cfg with basic blocks as nodes is necessary. Its construction and some types of dfa problems should belong to the front-end because warnings such as a...
```c typedef float foo foo main() {} ``` ``` t.c:1:18: ERROR - syntax error; expected `;' before `identifier' typedef float foo ^ t.c:3:1: ERROR - unknown type `foo' foo main()...
Cases to handle: - [ ] `__VA_OPT__` in `__VA_OPT__()` - [ ] `__VA_OPT__` in other places - `__VA_OPT__` and `##` - [ ] `## __VA_OPT__ (...)` - [ ] `__VA_OPT__...
- [ ] seems to generate incorrect asm from `buzzard.1.c`: ``` /tmp/buzzard.1-31036.s: Assembler messages: /tmp/buzzard.1-31036.s:768: Error: junk `(%esi)' after register ``` - [ ] falls into infinite loop for `pjr.c`...
- [ ] inconsistent `printf` arguments - [x] range highlight - ~~"fix it" - correct common mistakes~~ - [x] display lines before and after macro expansion (#3) - [x] missing...
Looks very interesting in retrospect or to study compilers. How difficult would it be to support Mach-O?
While resolving #13, confirmed to need to speed up handling `#include` using a profiler.
This is from comparison to gcc (see #2 for details).