diff options
| author | bellard <bellard> | 2001-12-02 21:44:40 +0000 |
|---|---|---|
| committer | bellard <bellard> | 2001-12-02 21:44:40 +0000 |
| commit | a88b855866a1bb85e6eed52de1bc555f23ae8b53 (patch) | |
| tree | 291b130a21669284c71ebc291ba7d64127ff06b3 | |
| parent | ebdec645a8881006812e31eae39d569397e9304b (diff) | |
| download | tinycc-a88b855866a1bb85e6eed52de1bc555f23ae8b53.tar.gz tinycc-a88b855866a1bb85e6eed52de1bc555f23ae8b53.tar.bz2 | |
update
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | README | 49 | ||||
| -rw-r--r-- | TODO | 15 |
3 files changed, 28 insertions, 38 deletions
@@ -11,7 +11,7 @@ LIBS=-ldl CFLAGS+=-m386 -malign-functions=0 DISAS=objdump -D -b binary -m i386 INSTALL=install -VERSION=0.9 +VERSION=0.9.1 all: tcc @@ -5,7 +5,7 @@ Features: -------- - SMALL! You can compile and execute C code everywhere, for example on - rescue disks (27KB for x86 TCC executable). + rescue disks (29KB for x86 TCC executable). - FAST! tcc generates optimized x86 code. No byte code overhead. Compiles, assemble and link about 7 times faster than 'gcc @@ -87,35 +87,17 @@ when doing 'make test'. Exact differences with ANSI C: ----------------------------- -1) Preprocessor - - - 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! - -2) C language - -- Cannot pass struct/union as value. Cannot assign struct/union (use - memcpy instead). +- Preprocessor: 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! - Types: floating point numbers are not supported yet. -- (BUG) 'char' and 'short' casts do not truncate correctly. - -- 'sizeof' may not work if too complex expression is given. - -- bit fields are not supported. +- Bit fields are not supported. -- L'c' or L"string" for wide chars are parsed but not handled as wchar_t. - -- Cannot initialize auto (=local) arrays with implicit size - (workaround: specificy exact size in array declaration). Cannot - initialize auto arrays with strings. - -3) Linking - -- extern variables must appear in a referenced dll and cannot appear - in current source. +- Linking: extern variables must appear in a referenced dll and cannot + appear in current source. Supported ANSI C extensions: --------------------------- @@ -126,15 +108,20 @@ Supported ANSI C extensions: - '__func__' is a string variable containing the current function name (ISOC99). -- variadic macros: __VA_ARGS__ can be used for function-like macros (ISOC99): +- Variadic macros: __VA_ARGS__ can be used for function-like macros (ISOC99): #define dprintf(level, __VA_ARGS__) printf(__VA_ARGS__). -- declarations can appear anywhere in a block (ISOC99). +- Declarations can appear anywhere in a block (ISOC99). + +- Array and struct/union elements can be initialized in any order by + using designators (.e.g. { [0].x = 1 }) (ISOC99). + +- Compound initializers are supported (e.g. int *p = (int []){ 1, 2, + 3}) (ISOC99). -- array and struct/union elements can be initialized in any order by - using designators (.e. { [0].x = 1 }) (ISOC99). +- '#!' at the start of a line is ignored to allow scripting. -- binary digits can be entered ('0b101' instead of '5'). +- Binary digits can be entered ('0b101' instead of '5'). Technical Description: --------------------- @@ -2,18 +2,21 @@ TODO list: Critical: -- add structure assign. -- fix 'char' and 'short' casts. +- add float/double support (should be as small as possible while being + usable for RISC code generator too). - 0 is pointer - fix type compare -- fix L'' and L"" wide chars - add message if external function or variable not found. +- To check: 'sizeof' may not work if too complex expression is given. +- fix 'char' and 'short' casts (in function parameters and in assignment). - function pointers to forward reference (patch code generator). -- add float/double support (should be as small as possible while being - usable for RISC code generator too). Not critical: -- fix preprocessor symbol redefinition +- fix multiple compound literals inits in blocks (ISOC99 normative + example - only relevant when using gotos! -> must add boolean + variable to tell if compound literal was already initialized). +- fix L"\x1234" wide string case (need to store them as ints ?) */ +- fix preprocessor symbol redefinition - better constant opt (&&, ||, ?:) - add ELF executable and shared library output option (would be needed for completness!). |
