tcc: re-enable correct option -r support
[tinycc.git] / TODO
blob3adeef2fda63d61193f031b125ffaf9f475c12a8
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 lcc test suite -> fix bitfield binary operations
17 - check section alignment in C
18 - fix invalid cast in comparison 'if (v == (int8_t)v)'
19 - finish varargs.h support (gcc 3.2 testsuite issue)
20 - fix static functions declared inside block
21 - fix multiple unions init
22 - make libtcc fully reentrant (except for the compilation stage itself).
23 - struct/union/enum definitions in nested scopes (see also Debian bug #770657)
24 - __STDC_IEC_559__: float f(void) { static float x = 0.0 / 0.0; return x; }
25 - memory may be leaked after errors (longjmp).
27 Portability:
29 - it is assumed that int is 32-bit and sizeof(int) == 4
30 - int is used when host or target size_t would make more sense
31 - TCC handles target floating-point (fp) values using the host's fp
32   arithmetic, which is simple and fast but may lead to exceptions
33   and inaccuracy and wrong representations when cross-compiling
35 Linking:
37 - static linking (-static) does not work
39 Bound checking:
41 - fix bound exit on RedHat 7.3
42 - setjmp is not supported properly in bound checking.
43 - fix bound check code with '&' on local variables (currently done
44   only for local arrays).
45 - bound checking and float/long long/struct copy code. bound
46   checking and symbol + offset optimization
48 Missing features:
50 - disable-asm and disable-bcheck options
51 - __builtin_expect()
52 - atexit (Nigel Horne)
53 - C99: add complex types (gcc 3.2 testsuite issue)
54 - postfix compound literals (see 20010124-1.c)
55 - interactive mode / integrated debugger
57 Optimizations:
59 - suppress specific anonymous symbol handling
60 - more parse optimizations (=even faster compilation)
61 - memory alloc optimizations (=even faster compilation)
62 - optimize VT_LOCAL + const
63 - better local variables handling (needed for other targets)
65 Not critical:
67 - C99: fix multiple compound literals inits in blocks (ISOC99
68   normative example - only relevant when using gotos! -> must add
69   boolean variable to tell if compound literal was already
70   initialized).
71 - add PowerPC generator and improve codegen for RISC (need
72   to suppress VT_LOCAL and use a base register instead).
73 - fix preprocessor symbol redefinition
74 - add portable byte code generator and interpreter for other
75   unsupported architectures.
76 - C++: variable declaration in for, minimal 'class' support.
77 - win32: __intxx. use resolve for bchecked malloc et al.
78   check exception code (exception filter func).
79 - handle void (__attribute__() *ptr)()
80 - VLAs are implemented in a way that is not compatible with signals:
81   http://lists.gnu.org/archive/html/tinycc-devel/2015-11/msg00018.html
83 Fixed (probably):
85 - bug with defines:
86     #define spin_lock(lock) do { } while (0)
87     #define wq_spin_lock spin_lock
88     #define TEST() wq_spin_lock(a)
89 - typedefs can be structure fields
90 - see bugfixes.diff + improvement.diff from Daniel Glockner
91 - long long constant evaluation
92 - add alloca()
93 - gcc '-E' option.
94 - #include_next support for /usr/include/limits ?
95 - function pointers/lvalues in ? : (linux kernel net/core/dev.c)
96 - win32: add __stdcall, check GetModuleHandle for dlls.
97 - macro substitution with nested definitions (ShangHongzhang)
98 - with "-run" and libtcc, a PLT is now built.
99 - '-E' option was improved
100 - packed attribute is now supported
101 - ARM and ARM64 code generators have been added.