PDA

View Full Version : philosophical question about C


kid
10-16-2009, 04:08 PM
N00B question.

Fact 1: C source code is compiled in order to be run by the microprocessor.

Fact 2: GCC (GNU C Compiler) is programmed in C.

Contradiction: How is it possible for GCC to be programmed in C, if GCC itself needs to be compiled for it to work? Which came first the chicken or the egg?

Any thoughts?

oracleguy
10-16-2009, 04:10 PM
It is common with a lot of computer tools, like for example the source code for Subversion, a version control software, is stored in a Subversion repository.

But in the case of gcc, one of two things probably happened:
1) For the first couple revisions, they compiled it with someone else's compiler
2) The ultra basic first version was written in assembly