Fix test90 for 32 bits targets
[tinycc.git] / TODO
blob9a38b6b28d0251a2b354d243ef9268e4a60b4ef1
1 TODO list:
3 Releases:
4 - release tcc on a regular basis (which interval? 3 months?)
6 Bugs:
8 - i386 fastcall is mostly wrong
9 - FPU st(0) is left unclean (kwisatz haderach). Incompatible with
10   optimized gcc/msc code
11 - see transparent union pb in /urs/include/sys/socket.h
12 - precise behaviour of typeof with arrays ? (__put_user macro)
13   but should suffice for most cases)
14 - handle '? x, y : z' in unsized variable initialization (',' is
15   considered incorrectly as separator in preparser)
16 - transform functions to function pointers in function parameters
17   (net/ipv4/ip_output.c)
18 - fix function pointer type display
19 - check section alignment in C
20 - fix invalid cast in comparison 'if (v == (int8_t)v)'
21 - finish varargs.h support (gcc 3.2 testsuite issue)
22 - fix static functions declared inside block
23 - fix multiple unions init
24 - make libtcc fully reentrant (except for the compilation stage itself).
25 - struct/union/enum definitions in nested scopes (see also Debian bug #770657)
26 - __STDC_IEC_559__: float f(void) { static float x = 0.0 / 0.0; return x; }
27 - memory may be leaked after errors (longjmp).
29 Portability:
31 - it is assumed that int is 32-bit and sizeof(int) == 4
32 - int is used when host or target size_t would make more sense
33 - TCC handles target floating-point (fp) values using the host's fp
34   arithmetic, which is simple and fast but may lead to exceptions
35   and inaccuracy and wrong representations when cross-compiling
37 Linking:
39 - static linking (-static) does sort of work
40         works with musl libc
41         glibc requires libc.so even when statically linked (very bad, but not
42         up to tcc)
44 Bound checking:
46 - fix bound exit on RedHat 7.3
47 - setjmp is not supported properly in bound checking.
48 - fix bound check code with '&' on local variables (currently done
49   only for local arrays).
50 - bound checking and float/long long/struct copy code. bound
51   checking and symbol + offset optimization
53 Missing features:
55 - disable-asm and disable-bcheck options
56 - __builtin_expect()
57 - atexit (Nigel Horne)
58 - C99: add complex types (gcc 3.2 testsuite issue)
59 - postfix compound literals (see 20010124-1.c)
60 - interactive mode / integrated debugger
62 Optimizations:
64 - suppress specific anonymous symbol handling
65 - more parse optimizations (=even faster compilation)
66 - memory alloc optimizations (=even faster compilation)
67 - optimize VT_LOCAL + const
68 - better local variables handling (needed for other targets)
70 Not critical:
72 - C99: fix multiple compound literals inits in blocks (ISOC99
73   normative example - only relevant when using gotos! -> must add
74   boolean variable to tell if compound literal was already
75   initialized).
76 - add PowerPC generator and improve codegen for RISC (need
77   to suppress VT_LOCAL and use a base register instead).
78 - fix preprocessor symbol redefinition
79 - add portable byte code generator and interpreter for other
80   unsupported architectures.
81 - C++: variable declaration in for, minimal 'class' support.
82 - win32: __intxx. use resolve for bchecked malloc et al.
83   check exception code (exception filter func).
84 - handle void (__attribute__() *ptr)()
85 - VLAs are implemented in a way that is not compatible with signals:
86   http://lists.gnu.org/archive/html/tinycc-devel/2015-11/msg00018.html
88 Fixed (probably):
90 - bug with defines:
91     #define spin_lock(lock) do { } while (0)
92     #define wq_spin_lock spin_lock
93     #define TEST() wq_spin_lock(a)
94 - typedefs can be structure fields
95 - see bugfixes.diff + improvement.diff from Daniel Glockner
96 - long long constant evaluation
97 - add alloca()
98 - gcc '-E' option.
99 - #include_next support for /usr/include/limits ?
100 - function pointers/lvalues in ? : (linux kernel net/core/dev.c)
101 - win32: add __stdcall, check GetModuleHandle for dlls.
102 - macro substitution with nested definitions (ShangHongzhang)
103 - with "-run" and libtcc, a PLT is now built.
104 - '-E' option was improved
105 - packed attribute is now supported
106 - ARM and ARM64 code generators have been added.