What is C written in?

C compilers like GCC and Clang are written in C and C++. C is one of the earliest self-hosted languages — the original C compiler was written in B, then rewritten in C itself. GCC (GNU Compiler Collection) is primarily written in C and C++; Clang is written in C++.

Details

C compilers are generally self-hosted: they are written in C (or C++) and can compile their own source code. GCC, the GNU Compiler Collection, is implemented primarily in C with some C++. Clang/LLVM is implemented in C++.

Historically, the original C compiler was written in B (a predecessor to C) on the PDP-7. It was then rewritten in C once the language had enough capability — one of the earliest examples of compiler bootstrapping.

The dataset records compiler_written_in relationships from C and C++ to GCC and Clang, and a historical bootstrap relationship reflecting C's early self-hosting.

Explore in the Graph

See implementation and influence relationships interactively.

Open Interactive Graph →

Related Pages