git @ Cat's Eye Technologies Bhuna / b7ecc78
Make the build spew warnings. Cat's Eye Technologies 9 years ago
9 changed file(s) with 22 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
00 CC?=gcc
1
2 WARNS= -W -Wall -Wstrict-prototypes -Wmissing-prototypes \
3 -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual \
4 -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wchar-subscripts \
5 -Winline -Wnested-externs -Wredundant-decls
16
27 #CFLAGS+=-DNO_AR_STACK
38 #CFLAGS+=-DPOOL_VALUES
49 CFLAGS+=-DHASH_CONSING
510 CFLAGS+=-DINLINE_BUILTINS
6 CFLAGS+=-Wall -ansi
11 CFLAGS+=-DHAS_WCHAR_PREDS
12
13 ifdef ANSI
14 CFLAGS+= -ansi -pedantic
15 else
16 CFLAGS+= -std=c99 -D_POSIX_C_SOURCE=200112L
17 endif
18
19 CFLAGS+= ${WARNS} ${EXTRA_CFLAGS}
720
821 #CFLAGS+=-g -DDEBUG
922 CFLAGS+=-DNDEBUG
550550 return("AST_RETR");
551551 }
552552 #endif
553 return("AST_UNKNOWN??!?");
553 return("AST_UNKNOWN?");
554554 }
555555
556556 void
99 struct symbol_table;
1010
1111 struct builtin {
12 wchar_t *name;
12 const wchar_t *name;
1313 struct value (*fn)(struct activation *);
1414 struct type *(*ty)(void);
1515 int arity;
361361
362362 int maxlevel = 3;
363363
364 wchar_t *op[4][9] = {
364 const wchar_t *op[4][9] = {
365365 { L"&", L"|", L"", L"", L"", L"", L"", L"", L"" },
366366 { L"=", L"!=", L">", L"<", L">=", L"<=", L"\x2264", L"\x2265", L"\x2260" },
367367 { L"+", L"-", L"", L"", L"", L"", L"", L"", L"" },
3737 }
3838
3939 void
40 report(int rtype, struct scan_st *sc, char *fmt, ...)
40 report(int rtype, struct scan_st *sc, const char *fmt, ...)
4141 {
4242 va_list args;
4343 int i;
1717 extern void report_start(void);
1818 extern int report_finish(void);
1919
20 extern void report(int, struct scan_st *, char *, ...);
20 extern void report(int, struct scan_st *, const char *, ...);
2121
2222 #endif /* !__SCAN_H_ */
00 #include <assert.h>
11 #include <stdio.h>
2 #include <string.h>
23
34 #include "mem.h"
45 #include "type.h"
230230 }
231231
232232 struct value
233 value_new_error(char *error)
233 value_new_error(const char *error)
234234 {
235235 struct value v;
236236
8181
8282 struct value value_new_string(wchar_t *);
8383 struct value value_new_list(void);
84 struct value value_new_error(char *);
84 struct value value_new_error(const char *);
8585 struct value value_new_builtin(struct builtin *);
8686 struct value value_new_closure(struct ast *, struct activation *, int, int, int);
8787 struct value value_new_dict(void);