History

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 ...

grischka committed 9 years ago

Commit a4a20361 parent 981720413 files · +61 −90Browse files

Unified · Split

13 files
  1. arm-gen.c +1 −1
  2. i386-gen.c +4 −4
  3. lib/alloca-arm.S +0 −1
  4. lib/alloca86.S +0 −4
  5. lib/alloca86_64-bt.S +0 −4
  6. lib/alloca86_64.S +0 −4
  7. libtcc.c +12 −11
  8. tcc.h +2 −4
  9. tccelf.c +7 −8
  10. tccgen.c +23 −41
  11. tccpe.c +8 −4
  12. tccpp.c +3 −3
  13. x86_64-gen.c +1 −1
arm-gen.c+1−1
@@ -341,7 +341,7 @@ void stuff_const_harder(uint32_t op, uint32_t v) { · 340 unmodified lines
341341 }
342342 }
343343
344−ST_FUNC uint32_t encbranch(int pos, int addr, int fail)
344+uint32_t encbranch(int pos, int addr, int fail)
345345 {
346346 addr-=pos+8;
347347 addr/=4;
i386-gen.c+4−4
@@ -70,9 +70,6 @@ enum { · 69 unmodified lines
7070 /* maximum alignment (for aligned attribute support) */
7171 #define MAX_ALIGN 8
7272
73−/* generate jmp to a label */
74−#define gjmp2(instr,lbl) oad(instr,lbl)
75−
7673 /******************************************************/
7774 #else /* ! TARGET_DEFS_ONLY */
7875 /******************************************************/
@@ -148,7 +145,7 @@ ST_FUNC void gsym(int t) · 69 unmodified lines
148145 }
149146
150147 /* instruction + 4 bytes data. Return the address of the data */
151−ST_FUNC int oad(int c, int s)
148+static int oad(int c, int s)
152149 {
153150 int t;
154151 if (nocode_wanted)
@@ -159,6 +156,9 @@ ST_FUNC int oad(int c, int s) · 4 unmodified lines
159156 return t;
160157 }
161158
159+/* generate jmp to a label */
160+#define gjmp2(instr,lbl) oad(instr,lbl)
161+
162162 /* output constant with relocation if 'r & VT_SYM' is true */
163163 ST_FUNC void gen_addr32(int r, Sym *sym, long c)
164164 {
lib/alloca-arm.S+0−1
@@ -8,4 +8,3 @@ alloca: · 7 unmodified lines
88 mov r0, sp
99 mov pc, lr
1010 .size alloca, .-alloca
11− .section .note.GNU-stack,"",%progbits
lib/alloca86.S+0−4
@@ -28,8 +28,4 @@ p3: · 27 unmodified lines
2828 push %edx
2929 ret
3030
31−/* mark stack as nonexecutable */
32−#if defined __ELF__ && defined __linux__
33− .section .note.GNU-stack,"",@progbits
34−#endif
3531 /* ---------------------------------------------- */
lib/alloca86_64-bt.S+0−4
@@ -53,8 +53,4 @@ p3: · 52 unmodified lines
5353 ret
5454 #endif
5555
56−/* mark stack as nonexecutable */
57−#if defined __ELF__ && defined __linux__
58− .section .note.GNU-stack,"",@progbits
59−#endif
6056 /* ---------------------------------------------- */
lib/alloca86_64.S+0−4
@@ -35,8 +35,4 @@ p3: · 34 unmodified lines
3535 push %rdx
3636 ret
3737
38−/* mark stack as nonexecutable */
39−#if defined __ELF__ && defined __linux__
40− .section .note.GNU-stack,"",@progbits
41−#endif
4238 /* ---------------------------------------------- */
libtcc.c+12−11
@@ -403,13 +403,13 @@ PUB_FUNC void tcc_memstats(int bench) · 402 unmodified lines
403403 /********************************************************/
404404 /* dynarrays */
405405
406−ST_FUNC void dynarray_add(void ***ptab, int *nb_ptr, void *data)
406+ST_FUNC void dynarray_add(void *ptab, int *nb_ptr, void *data)
407407 {
408408 int nb, nb_alloc;
409409 void **pp;
410410
411411 nb = *nb_ptr;
412− pp = *ptab;
412+ pp = *(void ***)ptab;
413413 /* every power of two we double array size */
414414 if ((nb & (nb - 1)) == 0) {
415415 if (!nb)
@@ -417,7 +417,7 @@ ST_FUNC void dynarray_add(void ***ptab, int *nb_ptr, void *data) · 1 unmodified line
417417 else
418418 nb_alloc = nb * 2;
419419 pp = tcc_realloc(pp, nb_alloc * sizeof(void *));
420− *ptab = pp;
420+ *(void***)ptab = pp;
421421 }
422422 pp[nb++] = data;
423423 *nb_ptr = nb;
@@ -1013,7 +1013,7 @@ ST_FUNC int tcc_add_file_internal(TCCState *s1, const char *filename, int flags) · 589 unmodified lines
10131013 }
10141014
10151015 /* update target deps */
1016− dynarray_add((void ***)&s1->target_deps, &s1->nb_target_deps,
1016+ dynarray_add(&s1->target_deps, &s1->nb_target_deps,
10171017 tcc_strdup(filename));
10181018
10191019 parse_flags = 0;
@@ -1586,7 +1586,7 @@ static void args_parser_add_file(TCCState *s, const char* filename, int filetype · 566 unmodified lines
15861586 struct filespec *f = tcc_malloc(sizeof *f + strlen(filename));
15871587 f->type = filetype;
15881588 strcpy(f->name, filename);
1589− dynarray_add((void ***)&s->files, &s->nb_files, f);
1589+ dynarray_add(&s->files, &s->nb_files, f);
15901590 }
15911591
15921592 /* read list file */
@@ -1611,8 +1611,8 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv) · 18 unmodified lines
16111611 {
16121612 const TCCOption *popt;
16131613 const char *optarg, *r;
1614+ const char *run = NULL;
16141615 int optind = 0;
1615− int run = 0;
16161616 int x;
16171617 int last_o = -1;
16181618 CString linker_arg; /* collect -Wl options */
@@ -1631,8 +1631,10 @@ reparse: · 12 unmodified lines
16311631 }
16321632
16331633 if (r[0] != '-' || r[1] == '\0') {
1634− args_parser_add_file(s, r, s->filetype);
1634+ if (r[0] != '@') /* allow "tcc file(s) -run @ args ..." */
1635+ args_parser_add_file(s, r, s->filetype);
16351636 if (run) {
1637+ tcc_set_options(s, run);
16361638 optind--;
16371639 /* argv[0] will be this file */
16381640 break;
@@ -1753,7 +1755,7 @@ reparse: · 114 unmodified lines
17531755 tcc_add_sysinclude_path(s, buf);
17541756 break;
17551757 case TCC_OPTION_include:
1756− dynarray_add((void ***)&s->cmd_include_files,
1758+ dynarray_add(&s->cmd_include_files,
17571759 &s->nb_cmd_include_files, tcc_strdup(optarg));
17581760 break;
17591761 case TCC_OPTION_nostdinc:
@@ -1769,8 +1771,7 @@ reparse: · 9 unmodified lines
17691771 #ifndef TCC_IS_NATIVE
17701772 tcc_error("-run is not available in a cross compiler");
17711773 #endif
1772− tcc_set_options(s, optarg);
1773− run = 1;
1774+ run = optarg;
17741775 x = TCC_OUTPUT_MEMORY;
17751776 goto set_output_type;
17761777 case TCC_OPTION_v:
@@ -1903,7 +1904,7 @@ LIBTCCAPI int tcc_set_options(TCCState *s, const char *r) · 126 unmodified lines
19031904 }
19041905 cstr_ccat(&str, 0);
19051906 //printf("<%s>\n", str.data), fflush(stdout);
1906− dynarray_add((void ***)&argv, &argc, tcc_strdup(str.data));
1907+ dynarray_add(&argv, &argc, tcc_strdup(str.data));
19071908 cstr_free(&str);
19081909 }
19091910 ret = tcc_parse_args(s, argc, argv);
tcc.h+2−4
@@ -388,7 +388,7 @@ struct Attribute { · 387 unmodified lines
388388 func_export : 1,
389389 func_import : 1,
390390 func_args : 5,
391− func_proto : 1,
391+ func_body : 1,
392392 mode : 4,
393393 weak : 1,
394394 visibility : 2,
@@ -1096,7 +1096,7 @@ PUB_FUNC NORETURN void tcc_error(const char *fmt, ...); · 701 unmodified lines
10961096 PUB_FUNC void tcc_warning(const char *fmt, ...);
10971097
10981098 /* other utilities */
1099−ST_FUNC void dynarray_add(void ***ptab, int *nb_ptr, void *data);
1099+ST_FUNC void dynarray_add(void *ptab, int *nb_ptr, void *data);
11001100 ST_FUNC void dynarray_reset(void *pp, int *n);
11011101 ST_INLN void cstr_ccat(CString *cstr, int ch);
11021102 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) { · 383 unmodified lines
14861486 /* ------------ i386-gen.c ------------ */
14871487 #if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
14881488 ST_FUNC void g(int c);
1489−ST_FUNC int oad(int c, int s);
14901489 ST_FUNC void gen_le16(int c);
14911490 ST_FUNC void gen_le32(int c);
14921491 ST_FUNC void gen_addr32(int r, Sym *sym, long c);
@@ -1510,7 +1509,6 @@ ST_FUNC void gen_opl(int op); · 17 unmodified lines
15101509 ST_FUNC char *default_elfinterp(struct TCCState *s);
15111510 #endif
15121511 ST_FUNC void arm_init(struct TCCState *s);
1513−ST_FUNC uint32_t encbranch(int pos, int addr, int fail);
15141512 ST_FUNC void gen_cvt_itof1(int t);
15151513 #endif
15161514
tccelf.c+7−8
@@ -49,7 +49,7 @@ static int new_undef_sym = 0; /* Is there a new undefined sym since last new_und · 48 unmodified lines
4949 ST_FUNC void tccelf_new(TCCState *s)
5050 {
5151 /* no section zero */
52− dynarray_add((void ***)&s->sections, &s->nb_sections, NULL);
52+ dynarray_add(&s->sections, &s->nb_sections, NULL);
5353
5454 /* create standard sections */
5555 text_section = new_section(s, ".text", SHT_PROGBITS, SHF_ALLOC | SHF_EXECINSTR);
@@ -153,10 +153,10 @@ ST_FUNC Section *new_section(TCCState *s1, const char *name, int sh_type, int sh · 97 unmodified lines
153153 }
154154
155155 if (sh_flags & SHF_PRIVATE) {
156− dynarray_add((void ***)&s1->priv_sections, &s1->nb_priv_sections, sec);
156+ dynarray_add(&s1->priv_sections, &s1->nb_priv_sections, sec);
157157 } else {
158158 sec->sh_num = s1->nb_sections;
159− dynarray_add((void ***)&s1->sections, &s1->nb_sections, sec);
159+ dynarray_add(&s1->sections, &s1->nb_sections, sec);
160160 }
161161
162162 return sec;
@@ -1896,7 +1896,7 @@ static int tcc_write_elf_file(TCCState *s1, const char *filename, int phnum, · 1733 unmodified lines
18961896 static int elf_output_file(TCCState *s1, const char *filename)
18971897 {
18981898 int i, ret, phnum, shnum, file_type, file_offset, *sec_order;
1899− struct dyn_inf dyninf;
1899+ struct dyn_inf dyninf = {0};
19001900 ElfW(Phdr) *phdr;
19011901 ElfW(Sym) *sym;
19021902 Section *strsec, *interp, *dynamic, *dynstr;
@@ -1912,7 +1912,6 @@ static int elf_output_file(TCCState *s1, const char *filename) · 9 unmodified lines
19121912 phdr = NULL;
19131913 sec_order = NULL;
19141914 interp = dynamic = dynstr = NULL; /* avoid warning */
1915− dyninf.dyn_rel_off = 0; /* avoid warning */
19161915
19171916 if (file_type != TCC_OUTPUT_OBJ) {
19181917 relocate_common_syms();
@@ -2595,7 +2594,7 @@ ST_FUNC int tcc_load_dll(TCCState *s1, int fd, const char *filename, int level) · 676 unmodified lines
25952594 dllref = tcc_mallocz(sizeof(DLLReference) + strlen(soname));
25962595 dllref->level = level;
25972596 strcpy(dllref->name, soname);
2598− dynarray_add((void ***)&s1->loaded_dlls, &s1->nb_loaded_dlls, dllref);
2597+ dynarray_add(&s1->loaded_dlls, &s1->nb_loaded_dlls, dllref);
25992598
26002599 /* add dynamic symbols in dynsym_section */
26012600 for(i = 1, sym = dynsym + 1; i < nb_syms; i++, sym++) {
@@ -2825,9 +2824,9 @@ static int ld_add_file_list(TCCState *s1, const char *cmd, int as_needed) · 223 unmodified lines
28252824 goto lib_parse_error;
28262825 if (group) {
28272826 /* Add the filename *and* the libname to avoid future conversions */
2828− dynarray_add((void ***) &libs, &nblibs, tcc_strdup(filename));
2827+ dynarray_add(&libs, &nblibs, tcc_strdup(filename));
28292828 if (libname[0] != '\0')
2830− dynarray_add((void ***) &libs, &nblibs, tcc_strdup(libname));
2829+ dynarray_add(&libs, &nblibs, tcc_strdup(libname));
28312830 }
28322831 }
28332832 }
tccgen.c+23−41
@@ -1608,23 +1608,15 @@ static void gen_opl(int op) · 1607 unmodified lines
16081608 a = 0;
16091609 b = 0;
16101610 gen_op(op1);
1611− if (op1 != TOK_NE) {
1611+ if (op == TOK_NE) {
1612+ b = gvtst(0, 0);
1613+ } else {
16121614 a = gvtst(1, 0);
1613− }
1614− if (op != TOK_EQ) {
1615− /* generate non equal test */
1616− /* XXX: NOT PORTABLE yet */
1617− if (op1 == TOK_NE) {
1615+ if (op != TOK_EQ) {
1616+ /* generate non equal test */
1617+ vpushi(TOK_NE);
1618+ vtop->r = VT_CMP;
16181619 b = gvtst(0, 0);
1619− } else {
1620−#if defined(TCC_TARGET_I386)
1621− b = gjmp2(0x850f, 0);
1622−#elif defined(TCC_TARGET_ARM)
1623− b = ind;
1624− o(0x1A000000 | encbranch(ind, 0, 1));
1625−#else
1626− tcc_error("not implemented");
1627−#endif
16281620 }
16291621 }
16301622 /* compare low. Always unsigned */
@@ -4724,23 +4716,13 @@ ST_FUNC void unary(void) · 3093 unmodified lines
47244716 tcc_warning("implicit declaration of function '%s'", name);
47254717 s = external_global_sym(t, &func_old_type, 0);
47264718 }
4727− if ((s->type.t & (VT_STATIC | VT_INLINE | VT_BTYPE)) ==
4728− (VT_STATIC | VT_INLINE | VT_FUNC)) {
4729− /* if referencing an inline function, then we generate a
4730− symbol to it if not already done. It will have the
4731− effect to generate code for it at the end of the
4732− compilation unit. Inline function as always
4733− generated in the text section. */
4734− if (!s->c && !nocode_wanted)
4735− put_extern_sym(s, text_section, 0, 0);
4736− r = VT_SYM | VT_CONST;
4737− } else {
4738− r = s->r;
4739− /* A symbol that has a register is a local register variable,
4740− which starts out as VT_LOCAL value. */
4741− if ((r & VT_VALMASK) < VT_CONST)
4742− r = (r & ~VT_VALMASK) | VT_LOCAL;
4743− }
4719+
4720+ r = s->r;
4721+ /* A symbol that has a register is a local register variable,
4722+ which starts out as VT_LOCAL value. */
4723+ if ((r & VT_VALMASK) < VT_CONST)
4724+ r = (r & ~VT_VALMASK) | VT_LOCAL;
4725+
47444726 vset(&s->type, r, s->c);
47454727 /* Point to s as backpointer (even without r&VT_SYM).
47464728 Will be used by at least the x86 inline asm parser for
@@ -4822,7 +4804,7 @@ ST_FUNC void unary(void) · 75 unmodified lines
48224804 s = vtop->type.ref;
48234805 next();
48244806 sa = s->next; /* first parameter */
4825− nb_args = 0;
4807+ nb_args = regsize = 0;
48264808 ret.r2 = VT_CONST;
48274809 /* compute first implicit argument if a structure is returned */
48284810 if ((s->type.t & VT_BTYPE) == VT_STRUCT) {
@@ -5849,7 +5831,7 @@ static void block(int *bsym, int *csym, int is_expr) · 1020 unmodified lines
58495831 tcc_warning("empty case range");
58505832 }
58515833 cr->sym = ind;
5852− dynarray_add((void***) &cur_switch->p, &cur_switch->n, cr);
5834+ dynarray_add(&cur_switch->p, &cur_switch->n, cr);
58535835 skip(':');
58545836 is_expr = 0;
58555837 goto block_after_label;
@@ -6897,7 +6879,6 @@ static void gen_inline_functions(TCCState *s) · 1041 unmodified lines
68976879 fn->sym = NULL;
68986880 if (file)
68996881 pstrcpy(file->filename, sizeof file->filename, fn->filename);
6900− sym->r = VT_SYM | VT_CONST;
69016882 sym->type.t &= ~VT_INLINE;
69026883
69036884 begin_macro(fn->func_str, 1);
@@ -7038,8 +7019,6 @@ static int decl0(int l, int is_for_loop_init) · 134 unmodified lines
70387019 goto func_error1;
70397020
70407021 ref = sym->type.ref;
7041− if (0 == ref->a.func_proto)
7042− tcc_error("redefinition of '%s'", get_tok_str(v, NULL));
70437022
70447023 /* use func_call from prototype if not defined */
70457024 if (ref->a.func_call != FUNC_CDECL
@@ -7064,15 +7043,20 @@ static int decl0(int l, int is_for_loop_init) · 18 unmodified lines
70647043 tcc_error("incompatible types for redefinition of '%s'",
70657044 get_tok_str(v, NULL));
70667045 }
7067− type.ref->a.func_proto = 0;
7046+ if (ref->a.func_body)
7047+ tcc_error("redefinition of '%s'", get_tok_str(v, NULL));
70687048 /* if symbol is already defined, then put complete type */
70697049 sym->type = type;
7050+
70707051 } else {
70717052 /* put function symbol */
70727053 sym = global_identifier_push(v, type.t, 0);
70737054 sym->type.ref = type.ref;
70747055 }
70757056
7057+ sym->type.ref->a.func_body = 1;
7058+ sym->r = VT_SYM | VT_CONST;
7059+
70767060 /* static inline functions are just recorded as a kind
70777061 of macro. Their code will be emitted at the end of
70787062 the compilation unit only if they are used */
@@ -7106,14 +7090,13 @@ static int decl0(int l, int is_for_loop_init) · 27 unmodified lines
71067090 }
71077091 tok_str_add(fn->func_str, -1);
71087092 tok_str_add(fn->func_str, 0);
7109− dynarray_add((void ***)&tcc_state->inline_fns, &tcc_state->nb_inline_fns, fn);
7093+ dynarray_add(&tcc_state->inline_fns, &tcc_state->nb_inline_fns, fn);
71107094
71117095 } else {
71127096 /* compute text section */
71137097 cur_text_section = ad.section;
71147098 if (!cur_text_section)
71157099 cur_text_section = text_section;
7116− sym->r = VT_SYM | VT_CONST;
71177100 gen_function(sym);
71187101 }
71197102 break;
@@ -7138,7 +7121,6 @@ static int decl0(int l, int is_for_loop_init) · 18 unmodified lines
71387121 if ((type.t & VT_BTYPE) == VT_FUNC) {
71397122 /* external function definition */
71407123 /* specific case for func_call attribute */
7141− ad.a.func_proto = 1;
71427124 type.ref->a = ad.a;
71437125 } else if (!(type.t & VT_ARRAY)) {
71447126 /* not lvalue if array */
tccpe.c+8−4
@@ -691,6 +691,10 @@ static int pe_write(struct pe_info *pe) · 690 unmodified lines
691691 psh->PointerToRawData = file_offset;
692692 file_offset = pe_file_align(pe, file_offset + si->data_size);
693693 psh->SizeOfRawData = file_offset - psh->PointerToRawData;
694+ if (si->cls == sec_text)
695+ pe_header.opthdr.SizeOfCode += psh->SizeOfRawData;
696+ else
697+ pe_header.opthdr.SizeOfInitializedData += psh->SizeOfRawData;
694698 }
695699 }
696700
@@ -753,7 +757,7 @@ static struct import_symbol *pe_add_import(struct pe_info *pe, int sym_index) · 56 unmodified lines
753757 }
754758 p = tcc_mallocz(sizeof *p);
755759 p->dll_index = dll_index;
756− dynarray_add((void***)&pe->imp_info, &pe->imp_count, p);
760+ dynarray_add(&pe->imp_info, &pe->imp_count, p);
757761
758762 found_dll:
759763 i = dynarray_assoc ((void**)p->symbols, p->sym_count, sym_index);
@@ -761,7 +765,7 @@ found_dll: · 1 unmodified line
761765 return p->symbols[i];
762766
763767 s = tcc_mallocz(sizeof *s);
764− dynarray_add((void***)&p->symbols, &p->sym_count, s);
768+ dynarray_add(&p->symbols, &p->sym_count, s);
765769 s->sym_index = sym_index;
766770 return s;
767771 }
@@ -904,7 +908,7 @@ static void pe_build_exports(struct pe_info *pe) · 136 unmodified lines
904908 p = tcc_malloc(sizeof *p);
905909 p->index = sym_index;
906910 p->name = name;
907− dynarray_add((void***)&sorted, &sym_count, p);
911+ dynarray_add(&sorted, &sym_count, p);
908912 }
909913 #if 0
910914 if (sym->st_other & ST_PE_EXPORT)
@@ -1515,7 +1519,7 @@ static int add_dllref(TCCState *s1, const char *dllname) · 604 unmodified lines
15151519 return i + 1;
15161520 dllref = tcc_mallocz(sizeof(DLLReference) + strlen(dllname));
15171521 strcpy(dllref->name, dllname);
1518− dynarray_add((void ***) &s1->loaded_dlls, &s1->nb_loaded_dlls, dllref);
1522+ dynarray_add(&s1->loaded_dlls, &s1->nb_loaded_dlls, dllref);
15191523 return s1->nb_loaded_dlls;
15201524 }
15211525
tccpp.c+3−3
@@ -1566,7 +1566,7 @@ static CachedInclude *search_cached_include(TCCState *s1, const char *filename, · 1565 unmodified lines
15661566 e = tcc_malloc(sizeof(CachedInclude) + strlen(filename));
15671567 strcpy(e->filename, filename);
15681568 e->ifndef_macro = e->once = 0;
1569− dynarray_add((void ***)&s1->cached_includes, &s1->nb_cached_includes, e);
1569+ dynarray_add(&s1->cached_includes, &s1->nb_cached_includes, e);
15701570 /* add in hash table */
15711571 e->hash_next = s1->cached_includes_hash[h];
15721572 s1->cached_includes_hash[h] = s1->nb_cached_includes;
@@ -1665,7 +1665,7 @@ static void pragma_parse(TCCState *s1) · 92 unmodified lines
16651665 if (tok != TOK_STR)
16661666 goto pragma_err;
16671667 file = tcc_strdup((char *)tokc.str.data);
1668− dynarray_add((void ***)&s1->pragma_libs, &s1->nb_pragma_libs, file);
1668+ dynarray_add(&s1->pragma_libs, &s1->nb_pragma_libs, file);
16691669 next();
16701670 if (tok != ')')
16711671 goto pragma_err;
@@ -1820,7 +1820,7 @@ ST_FUNC void preprocess(int is_bof) · 148 unmodified lines
18201820 printf("%s: including %s\n", file->prev->filename, file->filename);
18211821 #endif
18221822 /* update target deps */
1823− dynarray_add((void ***)&s1->target_deps, &s1->nb_target_deps,
1823+ dynarray_add(&s1->target_deps, &s1->nb_target_deps,
18241824 tcc_strdup(buf1));
18251825 /* push current file in stack */
18261826 ++s1->include_stack_ptr;
x86_64-gen.c+1−1
@@ -224,7 +224,7 @@ static int is64_type(int t) · 223 unmodified lines
224224 }
225225
226226 /* instruction + 4 bytes data. Return the address of the data */
227−ST_FUNC int oad(int c, int s)
227+static int oad(int c, int s)
228228 {
229229 int t;
230230 if (nocode_wanted)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t