diff --git a/tcc-doc.texi b/tcc-doc.texi
new file mode 100644
index 00000000..f1930d77
--- /dev/null
+++ b/tcc-doc.texi
@@ -0,0 +1,172 @@
+
+
+
+
+ Tiny C Compiler Reference Documentation
+
+
+
+
+
+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 point
+and long long numbers.
+
+
+ - The preprocessor tokens are the same as C. It means that in some
+ rare cases, preprocessed numbers are not handled exactly as in ANSI
+ C. This approach has the advantage of being simpler and FAST!
+
+
- Floating point numbers are not fully supported yet (some
+ implicit casts are missing).
+
+
- Some typing errors are not signaled.
+
+
+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:
+
+
+
+- 'inline' keyword is ignored.
+
+
- 'restrict' keyword is ignored.
+
+
- '__func__' is a string variable containing the current
+function name.
+
+
- Variadic macros: __VA_ARGS__ can be used for
+ function-like macros:
+
+ #define dprintf(level, __VA_ARGS__) printf(__VA_ARGS__)
+
+dprintf can then be used with a variable number of parameters.
+
+ - Declarations can appear anywhere in a block as in C++.
+
+
- Array and struct/union elements can be initialized in any order by
+ using designators:
+
+ struct { int x, y; } st[10] = { [0].x = 1, [0].y = 2 };
+
+ int tab[10] = { 1, 2, [5] = 5, [9] = 9};
+
+
+ - Compound initializers are supported:
+
+ int *p = (int []){ 1, 2, 3 };
+
+to initialize a pointer pointing to an initialized array. The same
+works for structures and strings.
+
+ - The boolean type '_Bool' is supported.
+
+
- 'long long' types not supported yet, except in type
+ definition or 'sizeof'.
+
+
- Hexadecimal floating point constants are supported:
+
+ double d = 0x1234p10;
+
+is the same as writing
+
+ double d = 4771840.0;
+
+
+
+GNU C extensions
+
+TCC implements some GNU C extensions which are found in many C sources:
+
+
+
+- array designators can be used without '=':
+
+ int a[10] = { [0] 1, [5] 2, 3, 4 };
+
+
+ - Structure field designators can be a label:
+
+ struct { int x, y; } st = { x: 1, y: 1};
+
+instead of
+
+ struct { int x, y; } st = { .x = 1, .y = 1};
+
+
+ - '\e' is ASCII character 27.
+
+
+
+TinyCC extensions
+
+I have added some extensions I find interesting:
+
+
+
+- __TINYC__ is a predefined macro to '1' to
+indicate that you use TCC.
+
+
- '#!' at the start of a line is ignored to allow scripting.
+
+
- Binary digits can be entered ('0b101' instead of
+'5').
+
+
+
+ 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/
+
+
+