| @@ -515,7 +515,7 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section, · 514 unmodified lines |
| 515 | 515 | } |
| 516 | 516 | #else |
| 517 | 517 | if (! (sym->type.t & VT_STATIC)) |
| 518 | | − other = (sym->type.t & VT_VIS_MASK) >> VT_VIS_SHIFT; |
| 518 | + other = (sym->type.t & VT_VIS_MASK) >> VT_VIS_SHIFT; |
| 519 | 519 | #endif |
| 520 | 520 | if (tcc_state->leading_underscore && can_add_underscore) { |
| 521 | 521 | buf1[0] = '_'; |
| @@ -829,31 +829,13 @@ static int tcc_compile(TCCState *s1) · 307 unmodified lines |
| 829 | 829 | |
| 830 | 830 | LIBTCCAPI int tcc_compile_string(TCCState *s, const char *str) |
| 831 | 831 | { |
| 832 | | − int i; |
| 833 | 832 | int len, ret; |
| 834 | 833 | len = strlen(str); |
| 835 | 834 | |
| 836 | 835 | tcc_open_bf(s, "<string>", len); |
| 837 | 836 | memcpy(file->buffer, str, len); |
| 838 | | − |
| 839 | | − len = s->nb_files; |
| 840 | 837 | ret = tcc_compile(s); |
| 841 | 838 | tcc_close(); |
| 842 | | − |
| 843 | | − /* habdle #pragma comment(lib,) */ |
| 844 | | − for(i = len; i < s->nb_files; i++) { |
| 845 | | − /* int filetype = *(unsigned char *)s->files[i]; */ |
| 846 | | − const char *filename = s->files[i] + 1; |
| 847 | | − if (filename[0] == '-' && filename[1] == 'l') { |
| 848 | | − if (tcc_add_library(s, filename + 2) < 0) { |
| 849 | | − tcc_warning("cannot find '%s'", filename+2); |
| 850 | | − ret++; |
| 851 | | − } |
| 852 | | − } |
| 853 | | − tcc_free(s->files[i]); |
| 854 | | − } |
| 855 | | − s->nb_files = len; |
| 856 | | − |
| 857 | 839 | return ret; |
| 858 | 840 | } |
| 859 | 841 | |
| @@ -1357,7 +1339,7 @@ LIBTCCAPI int tcc_set_output_type(TCCState *s, int output_type) · 497 unmodified lines |
| 1357 | 1339 | { |
| 1358 | 1340 | s->output_type = output_type; |
| 1359 | 1341 | if (output_type == TCC_OUTPUT_PREPROCESS) |
| 1360 | | − print_defines(); |
| 1342 | + print_defines(); |
| 1361 | 1343 | |
| 1362 | 1344 | if (!s->nostdinc) { |
| 1363 | 1345 | /* default include paths */ |
| @@ -1917,16 +1899,16 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv) · 553 unmodified lines |
| 1917 | 1899 | s->do_debug = 1; |
| 1918 | 1900 | break; |
| 1919 | 1901 | case TCC_OPTION_c: |
| 1920 | | − if (s->output_type) |
| 1902 | + if (s->output_type) |
| 1921 | 1903 | tcc_warning("-c: some compiler action already specified (%d)", s->output_type); |
| 1922 | 1904 | s->output_type = TCC_OUTPUT_OBJ; |
| 1923 | 1905 | break; |
| 1924 | 1906 | case TCC_OPTION_d: |
| 1925 | | − if (*optarg != 'D') { |
| 1926 | | − if (s->warn_unsupported) |
| 1927 | | − goto unsupported_option; |
| 1907 | + if (*optarg != 'D') { |
| 1908 | + if (s->warn_unsupported) |
| 1909 | + goto unsupported_option; |
| 1928 | 1910 | tcc_error("invalid option -- '%s'", r); |
| 1929 | | − } |
| 1911 | + } |
| 1930 | 1912 | s->dflag = 1; |
| 1931 | 1913 | break; |
| 1932 | 1914 | #ifdef TCC_TARGET_ARM |
| @@ -1945,11 +1927,11 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv) · 12 unmodified lines |
| 1945 | 1927 | s->static_link = 1; |
| 1946 | 1928 | break; |
| 1947 | 1929 | case TCC_OPTION_std: |
| 1948 | | − /* silently ignore, a current purpose: |
| 1949 | | − allow to use a tcc as a reference compiler for "make test" */ |
| 1930 | + /* silently ignore, a current purpose: |
| 1931 | + allow to use a tcc as a reference compiler for "make test" */ |
| 1950 | 1932 | break; |
| 1951 | 1933 | case TCC_OPTION_shared: |
| 1952 | | − if (s->output_type) |
| 1934 | + if (s->output_type) |
| 1953 | 1935 | tcc_warning("-shared: some compiler action already specified (%d)", s->output_type); |
| 1954 | 1936 | s->output_type = TCC_OUTPUT_DLL; |
| 1955 | 1937 | break; |
| @@ -1964,7 +1946,7 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv) · 8 unmodified lines |
| 1964 | 1946 | break; |
| 1965 | 1947 | case TCC_OPTION_r: |
| 1966 | 1948 | /* generate a .o merging several output files */ |
| 1967 | | − if (s->output_type) |
| 1949 | + if (s->output_type) |
| 1968 | 1950 | tcc_warning("-r: some compiler action already specified (%d)", s->output_type); |
| 1969 | 1951 | s->option_r = 1; |
| 1970 | 1952 | s->output_type = TCC_OUTPUT_OBJ; |
| @@ -1982,7 +1964,7 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv) · 11 unmodified lines |
| 1982 | 1964 | s->print_search_dirs = 1; |
| 1983 | 1965 | break; |
| 1984 | 1966 | case TCC_OPTION_run: |
| 1985 | | − if (s->output_type) |
| 1967 | + if (s->output_type) |
| 1986 | 1968 | tcc_warning("-run: some compiler action already specified (%d)", s->output_type); |
| 1987 | 1969 | s->output_type = TCC_OUTPUT_MEMORY; |
| 1988 | 1970 | tcc_set_options(s, optarg); |
| @@ -2013,7 +1995,7 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv) · 24 unmodified lines |
| 2013 | 1995 | cstr_ccat(&linker_arg, '\0'); |
| 2014 | 1996 | break; |
| 2015 | 1997 | case TCC_OPTION_E: |
| 2016 | | − if (s->output_type) |
| 1998 | + if (s->output_type) |
| 2017 | 1999 | tcc_warning("-E: some compiler action already specified (%d)", s->output_type); |
| 2018 | 2000 | s->output_type = TCC_OUTPUT_PREPROCESS; |
| 2019 | 2001 | break; |