4 ms·
Could a compiler as simple as TCC, if it was available at the time, have succeeded as the minimum viable product for GNU's C compiler? How do gcc 1's optimizati
by cpeterso 9y ago
Could a compiler as simple as TCC, if it was available at the time, have succeeded as the minimum viable product for GNU's C compiler? How do gcc 1's optimizations compare to TCC's today?
- eesmith 9y agoOptimizations were less important for gcc's popularity than you might think. One of the key features of gcc was its portability across many architectures. Cygnus was one of the first companies to support free software. Among other things, they received income from companies who wanted gcc to run on new chipsets. Another was that gcc was designed with multi-language support from the start. The original release only supported C, but C++ support can shortly afterwards. (Originally added by Tiemann, one of the founders of Cygnus.) TCC is not designed with the same portability or multi-language support in mind.
- aidenn0 9y agoTCC (as it was last time I looked) would have been a non-starter since it is so closely tied to a single platform. gcc had the advantage of the same compiler everywhere. Without gcc, you were using your Unix vendor's in-house compiler, which was usually a half-assed PCC port that was declared "done" as soon as AT&T's sources compiled. gcc was both higher quality and had the same frontend quirks regardless of the platform. Particularly before 1989, the standard was "Work like K&R's compiler" rather than anything formal, so there were a lot of nooks and crannies where each compiler did its own thing.