blob: ab733ba5d99c1bfc1f2510d504900dbeda92f4a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
we're attempting to stay as close to mainline chibicc as possible
at a high level, the major changes made are:
- strip out most of proprocess.c, as we're OK with using GCC's preprocessor
(still need preprocess.c, as it handles parsing of literals)
- add a typegen.c, which runs before codegen & outputs the typedefs
- replace codegen.c to output C instead of assembly
to support these, ended up making some changes to the rest of the files. these
include:
- in type.c:usual_arith_conv,
- don't cast if they're already the right type
- for pointer arithmetic, leave it as pointer + long
- in parse.c:is_const_expr, also allow modulos to be const
|