Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I personally struggled to work with other compilers, I think TCC is too terse, and GCC/Clang have too much code.

https://github.com/rui314/8cc Got things right, and I am trying continue with it's style.

I will be happy if a student can take my compiler and port it to his own invented cpu with a modest amount of work.



Terseness is quite a subjective thing, as I think TCC is not all that small among all the C (and C-subset) compilers that exist like Small-C; on the other hand, OTCC is in realm of "too terse" for me.

This one is more agreeable with my style (and I think the parser in it is amazingly concise and elegant):

https://github.com/rswier/c4/blob/master/c4.c


TCC packs a C compiler, assembler and linker together, So it has a large amount of functionality, even if it is no longer so tiny. The code style is really dense too. Frequently using single letter function and variable names.

e.g. Outputting data into the final data segments uses functions named o() and o32().




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: