| @@ -5,7 +5,7 @@ Features: · 4 unmodified lines |
| 5 | 5 | -------- |
| 6 | 6 | |
| 7 | 7 | - SMALL! You can compile and execute C code everywhere, for example on |
| 8 | | − rescue disks (27KB for x86 TCC executable). |
| 8 | + rescue disks (29KB for x86 TCC executable). |
| 9 | 9 | |
| 10 | 10 | - FAST! tcc generates optimized x86 code. No byte code |
| 11 | 11 | overhead. Compiles, assemble and link about 7 times faster than 'gcc |
| @@ -87,35 +87,17 @@ when doing 'make test'. · 75 unmodified lines |
| 87 | 87 | Exact differences with ANSI C: |
| 88 | 88 | ----------------------------- |
| 89 | 89 | |
| 90 | | −1) Preprocessor |
| 91 | | − |
| 92 | | − - the preprocessor tokens are the same as C. It means that in some |
| 93 | | − rare cases, preprocessed numbers are not handled exactly as in ANSI |
| 94 | | − C. This approach has the advantage of being simpler and FAST! |
| 95 | | − |
| 96 | | −2) C language |
| 97 | | − |
| 98 | | −- Cannot pass struct/union as value. Cannot assign struct/union (use |
| 99 | | − memcpy instead). |
| 90 | +- Preprocessor: the preprocessor tokens are the same as C. It means |
| 91 | + that in some rare cases, preprocessed numbers are not handled |
| 92 | + exactly as in ANSI C. This approach has the advantage of being |
| 93 | + simpler and FAST! |
| 100 | 94 | |
| 101 | 95 | - Types: floating point numbers are not supported yet. |
| 102 | 96 | |
| 103 | | −- (BUG) 'char' and 'short' casts do not truncate correctly. |
| 104 | | − |
| 105 | | −- 'sizeof' may not work if too complex expression is given. |
| 106 | | − |
| 107 | | −- bit fields are not supported. |
| 97 | +- Bit fields are not supported. |
| 108 | 98 | |
| 109 | | −- L'c' or L"string" for wide chars are parsed but not handled as wchar_t. |
| 110 | | − |
| 111 | | −- Cannot initialize auto (=local) arrays with implicit size |
| 112 | | − (workaround: specificy exact size in array declaration). Cannot |
| 113 | | − initialize auto arrays with strings. |
| 114 | | − |
| 115 | | −3) Linking |
| 116 | | − |
| 117 | | −- extern variables must appear in a referenced dll and cannot appear |
| 118 | | − in current source. |
| 99 | +- Linking: extern variables must appear in a referenced dll and cannot |
| 100 | + appear in current source. |
| 119 | 101 | |
| 120 | 102 | Supported ANSI C extensions: |
| 121 | 103 | --------------------------- |
| @@ -126,15 +108,20 @@ Supported ANSI C extensions: · 4 unmodified lines |
| 126 | 108 | |
| 127 | 109 | - '__func__' is a string variable containing the current function name (ISOC99). |
| 128 | 110 | |
| 129 | | −- variadic macros: __VA_ARGS__ can be used for function-like macros (ISOC99): |
| 111 | +- Variadic macros: __VA_ARGS__ can be used for function-like macros (ISOC99): |
| 130 | 112 | #define dprintf(level, __VA_ARGS__) printf(__VA_ARGS__). |
| 131 | 113 | |
| 132 | | −- declarations can appear anywhere in a block (ISOC99). |
| 114 | +- Declarations can appear anywhere in a block (ISOC99). |
| 115 | + |
| 116 | +- Array and struct/union elements can be initialized in any order by |
| 117 | + using designators (.e.g. { [0].x = 1 }) (ISOC99). |
| 118 | + |
| 119 | +- Compound initializers are supported (e.g. int *p = (int []){ 1, 2, |
| 120 | + 3}) (ISOC99). |
| 133 | 121 | |
| 134 | | −- array and struct/union elements can be initialized in any order by |
| 135 | | − using designators (.e. { [0].x = 1 }) (ISOC99). |
| 122 | +- '#!' at the start of a line is ignored to allow scripting. |
| 136 | 123 | |
| 137 | | −- binary digits can be entered ('0b101' instead of '5'). |
| 124 | +- Binary digits can be entered ('0b101' instead of '5'). |
| 138 | 125 | |
| 139 | 126 | Technical Description: |
| 140 | 127 | --------------------- |