From a4a20360e9df90bb8a0ed23d113ed5564882de8a Mon Sep 17 00:00:00 2001 From: grischka Date: Mon, 13 Feb 2017 18:23:43 +0100 Subject: fixes & cleanups - tccgen.c/tcc.h: allow function declaration after use: int f() { return g(); } int g() { return 1; } may be a warning but not an error see also 76cb1144ef91924c53c57ea71e6f67ce73ce1cc6 - tccgen.c: redundant code related to inline functions removed (functions used anywhere have sym->c set automatically) - tccgen.c: make 32bit llop non-equal test portable (probably not on C67) - dynarray_add: change prototype to possibly avoid aliasing problems or at least warnings - lib/alloca*.S: ".section .note.GNU-stack,"",%progbits" removed (has no effect) - tccpe: set SizeOfCode field (for correct upx decompression) - libtcc.c: fixed alternative -run invocation tcc "-run -lxxx ..." file.c (meant to load the library after file). Also supported now: tcc files ... options ... -run @ arguments ... --- tcc.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index d46ab0e..c061c79 100644 --- a/tcc.h +++ b/tcc.h @@ -388,7 +388,7 @@ struct Attribute { func_export : 1, func_import : 1, func_args : 5, - func_proto : 1, + func_body : 1, mode : 4, weak : 1, visibility : 2, @@ -1096,7 +1096,7 @@ PUB_FUNC NORETURN void tcc_error(const char *fmt, ...); PUB_FUNC void tcc_warning(const char *fmt, ...); /* other utilities */ -ST_FUNC void dynarray_add(void ***ptab, int *nb_ptr, void *data); +ST_FUNC void dynarray_add(void *ptab, int *nb_ptr, void *data); ST_FUNC void dynarray_reset(void *pp, int *n); ST_INLN void cstr_ccat(CString *cstr, int ch); ST_FUNC void cstr_cat(CString *cstr, const char *str, int len); @@ -1486,7 +1486,6 @@ static inline void add64le(unsigned char *p, int64_t x) { /* ------------ i386-gen.c ------------ */ #if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64 ST_FUNC void g(int c); -ST_FUNC int oad(int c, int s); ST_FUNC void gen_le16(int c); ST_FUNC void gen_le32(int c); ST_FUNC void gen_addr32(int r, Sym *sym, long c); @@ -1510,7 +1509,6 @@ ST_FUNC void gen_opl(int op); ST_FUNC char *default_elfinterp(struct TCCState *s); #endif ST_FUNC void arm_init(struct TCCState *s); -ST_FUNC uint32_t encbranch(int pos, int addr, int fail); ST_FUNC void gen_cvt_itof1(int t); #endif -- cgit v1.3.1