ningenkawai

C programs are compiled using gcc which itself is written in C so how code for gcc is compiled?

New version of GCC is compiled in older version of GCC.

Older version of GCC was compiled by using even older version of GCC.

First version of GCC could be compiled by using a different C compiler.

The first C compiler was written in a different language: BCPL, so it used BCPL compiler.

The BCPL compiler was written in BCPL itself, so new versions of BCPL needed older versions of BCPL to be compiled, similarly to GCC.

The first version of BCPL was written in AED, or Algol.

The first Algol compiler was possibly written in machine code by using punch cards.

http://ericsplace.ddns.net/serialport-duplex/