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