This is an automated archive made by the Lemmit Bot.
The original was posted on /r/programminglanguages by /u/GeroSchorsch on 2024-04-04 19:17:45.
I wrote a C99 compiler (https://github.com/PhilippRados/wrecc) targeting x86-64 for MacOs and Linux.
It has a builtin preprocessor (which only misses function-like macros) and supports all types (except short
, floats
and doubles
) and most keywords (except some storage-class-specifiers/qualifiers).
Currently it can only compile a single .c file at a time.
The self-written backend emits x86-64 which is then assembled and linked using hosts as
and ld
.
Since this is my first compiler (it had a lot of rewrites) I would appreciate some feedback from people that have more knowledge in the field, as I just learned as I needed it (especially for typechecker -> codegen -> register-allocation phases)
It has 0 dependencies and everything is self-contained so it _should_ be easy to follow 😄