57523b3477a2b8f97cfe4f67cae8be801b637e84
[cparser] / TODO
1 Refactoring:
2 - eliminate target_architecture.h and replace with stuff in lang_features.h
3 - create structures for variables and functions, removing the omnipotent
4   declaration
5
6 Lexer:
7 - Add preprocessor code
8 - proper handling of different file encodings, parsing non-ascii strings
9 - We could save some space by holding source positions in a separate (somehow
10   compressed table) and only storing pointers to it on the AST.
11
12 Parser:
13 - disallow storage class specifiers in struct/union members
14 - add constant folding code (optional, ast2firm already does it)
15 - Refactor code, so code to handle number values (and strings?) is an own
16   module and replacable
17 - Support some attributes. noreturn, unused, printf, scanf, packed would be
18   interesting candidates
19 - Add columns to source positions
20 - SourcePositions could be stored selectively on expressions that really need
21   them.
22 - check semantic for functions declared/defined in global scope and declared
23   again in a local scope
24 - print initialisation type_path for initializer errors
25 - check switches for: double cases, all enums
26
27 ast2firm:
28 - handle non-constant initializers
29 - output source file positions for panics...
30 - handle bitfield members with 0 correctly (standard says they finish the
31   current unit)
32 - create asm nodes.
33
34 Missing Errors:
35 * label: declaration; is no valid C99 but we parse it anyway
36 * check switches for double cases
37
38 Missing Warnings:
39 * dead assignments (int x = 5; x = bla(); -> dead assignment at x = 5;)
40 * unused label
41 * check switches for all enums values
42 * catch the if(k = b) cases, maybe require all assignments to be in parentheses
43   (but some few exceptions like toplevel, nested assignments)
44
45 Spec-Status:
46 (only test datasets tried yet)
47 164.gzip:    works
48 175.vpr:     works
49 176.gcc:     not ok
50 181.mcf:     works
51 186.crafty:  works (~though an asm is replaced with a stub)
52 253.perlbmk: not ok
53 254.gap:     not ok
54 255.vortex:  works
55 256.bzip2:   works
56 300.twolf:   works