Tiny C Compiler Reference Documentation

Introduction

TinyCC (aka TCC) is a small but very fast C compiler. Unlike other C compilers, it is meant to be self-suffisant: you do not need an external assembler or linker because TCC does that for you.

TCC compiles so fast that even for big projects Makefiles may not be necessary.

TCC can also be used to make C scripts, i.e. pieces of C source that you run as a Perl or Python script. Compilation is so fast that your script will be as fast as if it was an executable.

Exact differences with ANSI C

TCC implements almost all the ANSI C standard, except floating points numbers.

ISOC99 extensions

TCC implements many features of the new C standard: ISO C99. Currently missing items are: complex and imaginary numbers (will come with ANSI C floating point numbers), long longs and variable length arrays. Currently implemented ISOC99 features:

GNU C extensions

TCC implements some GNU C extensions which are found in many C sources:

TinyCC extensions

I have added some extensions I find interesting:

Command line invokation

usage: tcc [-Idir] [-Dsym] [-llib] [-i infile] infile [infile_args...]
'-Idir' specify an additionnal include path. The default ones are: /usr/include, /usr/lib/tcc, /usr/local/lib/tcc.
'-Dsym' define preprocessor symbol 'sym' to 1.
'-lxxx' dynamically link your program with library libxxx.so. Standard library paths are checked, including those specificed with LD_LIBRARY_PATH.
'-i file' compile C source 'file' before main C source. With this command, multiple C files can be compiled and linked together.

Copyright (c) 2001 Fabrice Bellard
Fabrice Bellard - fabrice.bellard at free.fr - http://fabrice.bellard.free.fr/ - http://www.tinycc.org/