History

update

bellard committed 24 years ago

Commit a88b8551 parent ebdec643 files · +28 −38Browse files

Unified · Split

3 files
  1. Makefile +1 −1
  2. README +18 −31
  3. TODO +9 −6
Makefile+1−1
@@ -11,7 +11,7 @@ LIBS=-ldl · 10 unmodified lines
11CFLAGS+=-m386 -malign-functions=011CFLAGS+=-m386 -malign-functions=0
12DISAS=objdump -D -b binary -m i38612DISAS=objdump -D -b binary -m i386
13INSTALL=install13INSTALL=install
14VERSION=0.914VERSION=0.9.1
15 15
16all: tcc16all: tcc
17 17
README+18−31
@@ -5,7 +5,7 @@ Features: · 4 unmodified lines
5--------5--------
6 6
7- SMALL! You can compile and execute C code everywhere, for example on7- 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- FAST! tcc generates optimized x86 code. No byte code10- FAST! tcc generates optimized x86 code. No byte code
11 overhead. Compiles, assemble and link about 7 times faster than 'gcc11 overhead. Compiles, assemble and link about 7 times faster than 'gcc
@@ -87,35 +87,17 @@ when doing 'make test'. · 75 unmodified lines
87Exact differences with ANSI C:87Exact differences with ANSI C:
88-----------------------------88-----------------------------
89 89
901) Preprocessor90- Preprocessor: the preprocessor tokens are the same as C. It means
91 91 that in some rare cases, preprocessed numbers are not handled
92 - the preprocessor tokens are the same as C. It means that in some92 exactly as in ANSI C. This approach has the advantage of being
93 rare cases, preprocessed numbers are not handled exactly as in ANSI93 simpler and FAST!
94 C. This approach has the advantage of being simpler and FAST!
95
962) C language
97
98- Cannot pass struct/union as value. Cannot assign struct/union (use
99 memcpy instead).
100 94
101- Types: floating point numbers are not supported yet.95- Types: floating point numbers are not supported yet.
102 96
103- (BUG) 'char' and 'short' casts do not truncate correctly.97- Bit fields are not supported.
104
105- 'sizeof' may not work if too complex expression is given.
106
107- bit fields are not supported.
108 98
109- L'c' or L"string" for wide chars are parsed but not handled as wchar_t.99- Linking: extern variables must appear in a referenced dll and cannot
110 100 appear in current source.
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
1153) Linking
116
117- extern variables must appear in a referenced dll and cannot appear
118 in current source.
119 101
120Supported ANSI C extensions:102Supported ANSI C extensions:
121---------------------------103---------------------------
@@ -126,15 +108,20 @@ Supported ANSI C extensions: · 4 unmodified lines
126 108
127- '__func__' is a string variable containing the current function name (ISOC99).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 #define dprintf(level, __VA_ARGS__) printf(__VA_ARGS__).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 by122- '#!' at the start of a line is ignored to allow scripting.
135 using designators (.e. { [0].x = 1 }) (ISOC99).
136 123
137- binary digits can be entered ('0b101' instead of '5').124- Binary digits can be entered ('0b101' instead of '5').
138 125
139Technical Description:126Technical Description:
140---------------------127---------------------
TODO+9−6
@@ -2,18 +2,21 @@ TODO list: · 1 unmodified line
2 2
3Critical:3Critical:
4 4
5- add structure assign.5- add float/double support (should be as small as possible while being
6- fix 'char' and 'short' casts.6 usable for RISC code generator too).
7- 0 is pointer - fix type compare7- 0 is pointer - fix type compare
8- fix L'' and L"" wide chars
9- add message if external function or variable not found.8- add message if external function or variable not found.
9- To check: 'sizeof' may not work if too complex expression is given.
10- fix 'char' and 'short' casts (in function parameters and in assignment).
10- function pointers to forward reference (patch code generator).11- function pointers to forward reference (patch code generator).
11- add float/double support (should be as small as possible while being
12 usable for RISC code generator too).
13 12
14Not critical:13Not critical:
15 14
16- fix preprocessor symbol redefinition 15- fix multiple compound literals inits in blocks (ISOC99 normative
16 example - only relevant when using gotos! -> must add boolean
17 variable to tell if compound literal was already initialized).
18- fix L"\x1234" wide string case (need to store them as ints ?) */
19- fix preprocessor symbol redefinition
17- better constant opt (&&, ||, ?:)20- better constant opt (&&, ||, ?:)
18- add ELF executable and shared library output option (would be needed21- add ELF executable and shared library output option (would be needed
19 for completness!).22 for completness!).

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t