Refactoring:
- eliminate target_architecture.h and replace with stuff in lang_features.h
-- create structures for variables and functions, removing the omnipotent
- declaration
Lexer:
-- Add preprocessor code
+- Add preprocessor code.
- proper handling of different file encodings, parsing non-ascii strings
- We could save some space by holding source positions in a separate (somehow
compressed table) and only storing pointers to it on the AST.
- add constant folding code (optional, ast2firm already does it)
- Refactor code, so code to handle number values (and strings?) is an own
module and replacable
-- Support some attributes. noreturn, unused, printf, scanf, packed would be
- interesting candidates
- Add columns to source positions
- SourcePositions could be stored selectively on expressions that really need
them.
- check semantic for functions declared/defined in global scope and declared
again in a local scope
+- for errors relating to function argument, print number of argument
- print initialisation type_path for initializer errors
ast2firm:
-- handle non-constant initializers
- output source file positions for panics.
- handle bitfield members with 0 correctly (standard says they finish the
current unit)
-- create asm nodes.
Missing Errors:
-* label: declaration; is no valid C99 but we parse it anyway
-* check switches for double cases
+- goto over VLA declarations
Missing Warnings:
-* dead assignments (int x = 5; x = bla(); -> dead assignment at x = 5;)
-* unused label
-* check switches for all enums values
-* catch the if(k = b) cases, maybe require all assignments to be in parentheses
+- dead assignments (int x = 5; x = bla(); -> dead assignment at x = 5;)
+- catch the if(k = b) cases, maybe require all assignments to be in parentheses
(but some few exceptions like toplevel, nested assignments)
+ - warn when folding shift constants with too large shift amounts
-Spec-Status:
-(only test datasets tried yet)
-164.gzip: works
-175.vpr: works
-176.gcc: not ok
-181.mcf: works
-186.crafty: works (~though an asm is replaced with a stub)
-253.perlbmk: not ok
-254.gap: not ok
-255.vortex: works
-256.bzip2: works
-300.twolf: works
+main/driver:
+- delete output file if we had an error
+- go through gcc manual and emulate all the gcc flags...