step: savepoint + add very anal compiler flags
This commit is contained in:
parent
007741dad0
commit
0cb46c4ef1
5
makefile
5
makefile
|
@ -7,6 +7,9 @@
|
|||
|
||||
## C compiler
|
||||
CC=tcc # much faster compilation than gcc
|
||||
COMPILER_FLAGS=-g3 -Wall -Wextra -Wconversion -Wdouble-promotion -Wno-unused-parameter -Wno-unused-function -Wno-sign-conversion -fsanitize=undefined -fsanitize-trap
|
||||
## ^ from <https://nullprogram.com/blog/2023/04/29/>
|
||||
## <https://news.ycombinator.com/item?id=35758898>
|
||||
|
||||
## Debugging options
|
||||
DEBUG=-g#-g
|
||||
|
@ -31,7 +34,7 @@ STYLE_BLUEPRINT=webkit
|
|||
FORMATTER=clang-format -i -style=$(STYLE_BLUEPRINT)
|
||||
|
||||
build: $(SRC)
|
||||
$(CC) -Wall $(INCS) $(SRC) $(MPC) -o mumble $(LIBS)
|
||||
$(CC) $(COMPILER_FLAGS) $(INCS) $(SRC) $(MPC) -o mumble $(LIBS)
|
||||
|
||||
format: $(SRC)
|
||||
$(FORMATTER) $(SRC)
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
https://buildyourownlisp.com/chapter7_evaluation#trees
|
||||
https://buildyourownlisp.com/chapter9_s_expressions
|
||||
|
|
|
@ -14,7 +14,7 @@ typedef struct {
|
|||
int err;
|
||||
} lispval;
|
||||
|
||||
enum { LISPVAL_NUM, LISPVAL_ERR };
|
||||
enum { LISPVAL_NUM, LISPVAL_ERR, LISPVAL_SYM, LISPVAL_SEXPR };
|
||||
enum { LISPERR_DIV_ZERO, LISPERR_BAD_OP, LISPERR_BAD_NUM };
|
||||
|
||||
lispval lispval_num(long x){
|
||||
|
|
Loading…
Reference in New Issue
Block a user