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
1111 CFLAGS+=-m386 -malign-functions=0
1212 DISAS=objdump -D -b binary -m i386
1313 INSTALL=install
14−VERSION=0.9
14+VERSION=0.9.1
1515
1616 all: tcc
1717
README+18−31
@@ -5,7 +5,7 @@ Features: · 4 unmodified lines
55 --------
66
77 - 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).
99
1010 - FAST! tcc generates optimized x86 code. No byte code
1111 overhead. Compiles, assemble and link about 7 times faster than 'gcc
@@ -87,35 +87,17 @@ when doing 'make test'. · 75 unmodified lines
8787 Exact differences with ANSI C:
8888 -----------------------------
8989
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!
10094
10195 - Types: floating point numbers are not supported yet.
10296
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.
10898
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.
119101
120102 Supported ANSI C extensions:
121103 ---------------------------
@@ -126,15 +108,20 @@ Supported ANSI C extensions: · 4 unmodified lines
126108
127109 - '__func__' is a string variable containing the current function name (ISOC99).
128110
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):
130112 #define dprintf(level, __VA_ARGS__) printf(__VA_ARGS__).
131113
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).
133121
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.
136123
137−- binary digits can be entered ('0b101' instead of '5').
124+- Binary digits can be entered ('0b101' instead of '5').
138125
139126 Technical Description:
140127 ---------------------
TODO+9−6
@@ -2,18 +2,21 @@ TODO list: · 1 unmodified line
22
33 Critical:
44
5−- add structure assign.
6−- fix 'char' and 'short' casts.
5+- add float/double support (should be as small as possible while being
6+ usable for RISC code generator too).
77 - 0 is pointer - fix type compare
8−- fix L'' and L"" wide chars
98 - 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).
1011 - 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).
1312
1413 Not critical:
1514
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
1720 - better constant opt (&&, ||, ?:)
1821 - add ELF executable and shared library output option (would be needed
1922 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