Redo "fix line number in macro redefined message"
[tinycc.git] / TODO
blobe6e5b0700909b9190527e728ccea30e42db5b9cf
1 TODO list:
3 Bugs:
5 - fix macro substitution with nested definitions (ShangHongzhang)
6 - FPU st(0) is left unclean (kwisatz haderach). Incompatible with
7   optimized gcc/msc code
9 - constructors
10 - cast bug (Peter Wang)
11 - define incomplete type if defined several times (Peter Wang).
12 - test binutils/gcc compile
13 - tci patch + argument.
14 - see -lxxx bug (Michael Charity).
15 - see transparent union pb in /urs/include/sys/socket.h
16 - precise behaviour of typeof with arrays ? (__put_user macro)
17   but should suffice for most cases)
18 - handle '? x, y : z' in unsized variable initialization (',' is
19   considered incorrectly as separator in preparser)
20 - transform functions to function pointers in function parameters
21   (net/ipv4/ip_output.c)
22 - fix function pointer type display
23 - check lcc test suite -> fix bitfield binary operations
24 - check section alignment in C
25 - fix invalid cast in comparison 'if (v == (int8_t)v)'
26 - finish varargs.h support (gcc 3.2 testsuite issue)
27 - fix static functions declared inside block
28 - fix multiple unions init
29 - sizeof, alignof, typeof can still generate code in some cases.
30 - Fix the remaining libtcc memory leaks.
31 - make libtcc fully reentrant (except for the compilation stage itself).
32 - struct/union/enum definitions in nested scopes (see also Debian bug #770657)
33 - __STDC_IEC_559__: float f(void) { static float x = 0.0 / 0.0; return x; }
35 Portability:
37 - it is assumed that int is 32-bit and sizeof(int) == 4
38 - int is used when host or target size_t would make more sense
39 - TCC handles target floating-point (fp) values using the host's fp
40   arithmetic, which is simple and fast but may lead to exceptions
41   and inaccuracy and wrong representations when cross-compiling
43 Linking:
45 - static linking does not work
46 - with "-run" and libtcc, no PLT is used, so branches may be out of
47   range and relocations may fail; as a result libtest fails on arm64; see:
48   https://lists.gnu.org/archive/html/tinycc-devel/2015-03/msg00111.html
50 Bound checking:
52 - '-b' bug.
53 - fix bound exit on RedHat 7.3
54 - setjmp is not supported properly in bound checking.
55 - fix bound check code with '&' on local variables (currently done
56   only for local arrays).
57 - bound checking and float/long long/struct copy code. bound
58   checking and symbol + offset optimization
60 Missing features:
62 - disable-asm and disable-bcheck options
63 - __builtin_expect()
64 - improve '-E' option.
65 - atexit (Nigel Horne)
66 - packed attribute
67 - C99: add complex types (gcc 3.2 testsuite issue)
68 - postfix compound literals (see 20010124-1.c)
70 Optimizations:
72 - suppress specific anonymous symbol handling
73 - more parse optimizations (=even faster compilation)
74 - memory alloc optimizations (=even faster compilation)
75 - optimize VT_LOCAL + const
76 - better local variables handling (needed for other targets)
78 Not critical:
80 - C99: fix multiple compound literals inits in blocks (ISOC99
81   normative example - only relevant when using gotos! -> must add
82   boolean variable to tell if compound literal was already
83   initialized).
84 - add PowerPC or ARM code generator and improve codegen for RISC (need
85   to suppress VT_LOCAL and use a base register instead).
86 - interactive mode / integrated debugger
87 - fix preprocessor symbol redefinition
88 - add portable byte code generator and interpreter for other
89   unsupported architectures.
90 - C++: variable declaration in for, minimal 'class' support.
91 - win32: __intxx. use resolve for bchecked malloc et al.
92   check exception code (exception filter func).
93 - handle void (__attribute__() *ptr)()
94 - VLAs are implemented in a way that is not compatible with signals:
95   http://lists.gnu.org/archive/html/tinycc-devel/2015-11/msg00018.html
97 Fixed (probably):
99 - bug with defines:
100     #define spin_lock(lock) do { } while (0)
101     #define wq_spin_lock spin_lock
102     #define TEST() wq_spin_lock(a)
103 - typedefs can be structure fields
104 - see bugfixes.diff + improvement.diff from Daniel Glockner
105 - long long constant evaluation
106 - add alloca()
107 - gcc '-E' option.
108 - #include_next support for /usr/include/limits ?
109 - function pointers/lvalues in ? : (linux kernel net/core/dev.c)
110 - win32: add __stdcall, check GetModuleHandle for dlls.