The code of TCC (0.9.26) is kind hard to compile, I have discovered in the past year, while developing a minimal C compiler to compile the TCC sources [1]. For that reason, I have concluded that TCC is its own test set. It uses the constant 0x80000000, which is an edge case for if you want to print it as a signed integer only using 32-bit operators. There is a switch statement with an post-increment operator in the switch expression. There are also switch statements with fall throughs and with goto statements in the cases. It uses the ## operator where the result is the name of a macro. Just to name a few.[1] https://github.com/FransFaase/MES-replacement
ForOldHack|22 days ago
You are using the compiler to compile itself.
"TCC is its own test set." Absolutely brilliant.
eichin|22 days ago
eulgro|22 days ago
Goto is easier to implement than an if statement. Postincrement behaves no differently in a switch statement than elsewhere.
fjfaase|21 days ago
Did you know that C has a keyword that is only a keyword in some places and that there is a function that can have two or three parameters?