Tiny C Compiler

Published: (February 7, 2026 at 04:45 PM EST)
2 min read

Source: Hacker News

Tiny C Compiler

News

I am no longer working on TCC. Check the mailing list for up‑to‑date information.

Features

  • SMALL! Compile and execute C code everywhere (e.g., on rescue disks). The x86 TCC executable is about 100 KB and includes the preprocessor, compiler, assembler, and linker.
  • FAST! Generates native x86 code with no byte‑code overhead. Compilation, assembly, and linking are several times faster than GCC.
  • UNLIMITED! Any C dynamic library can be used directly. TCC is moving toward full ISO C99 compliance and can even compile itself.
  • SAFE! Optional memory and bounds checker; checked code can be mixed freely with standard code.
  • Compile and execute C source directly—no separate linking or assembly step required. Full C preprocessor and GNU‑like assembler are included.
  • C scripts are supported: add #!/usr/local/bin/tcc -run as the first line of a C source file and run it directly from the command line.
  • With libtcc, TCC can be used as a backend for dynamic code generation.

Download

Download TCC

Compilation Speed

TCC is roughly 9 × faster than GCC for the Links Browser project.

CompilerVersionTime (s)Lines/secondMB/s
TinyCC0.9.222.27859 00029.6
GCC3.2 ‑O020.098 0003.4

The project contains 76 936 lines (including headers). Because the same headers are included in many files, 1 950 947 lines (67.2 MB) are actually compiled. Measurements were taken on a 2.4 GHz Pentium 4; real time includes compilation, assembly, and linking.

More recent tests:

Online Documentation

Documentation

You Want to Help?

  • Report bugs to the mailing list (and eventually fix them).

License

TCC is distributed under the GNU Lesser General Public License.

© 2001‑2018 Fabrice Bellard
Fabrice BellardTCC page

0 views
Back to Blog

Related posts

Read more »

Thoughts on Generating C

Static Inline Functions Enable Data Abstraction When I learned C, in the early days of GStreamerhttps://gstreamer.freedesktop.org/ oh bless its heart—it still...

I write games in C (yes, C)

Why I Write Games in C yes, C I am an unusual beast. All my solo‑project games I've been making recently have been written in vanilla C. Nobody does this, so I...

I write games in C (yes, C) (2016)

Why I Write Games in C yes, C I am an unusual beast. All my solo project games I've been making recently have been written in vanilla C. Nobody does this, so I...