/[tinycc]/tinycc/tcc.c
ViewVC logotype

Diff of /tinycc/tcc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.142 by bellard, Sun Jul 20 19:19:59 2003 UTC revision 1.143 by bellard, Fri Sep 19 20:35:50 2003 UTC
# Line 9549  int tcc_set_warning(TCCState *s, const c Line 9549  int tcc_set_warning(TCCState *s, const c
9549      return 0;      return 0;
9550  }  }
9551    
   
9552  #if !defined(LIBTCC)  #if !defined(LIBTCC)
9553    
9554    static void tcc_reset_warnings(TCCState *s)
9555    {
9556        int i;
9557        const WarningDef *p;
9558    
9559        for(i = 0, p = warning_defs; i < countof(warning_defs); i++, p++) {
9560            *(int *)((uint8_t *)s + p->offset) = 0;
9561        }
9562    }
9563    
9564  /* extract the basename of a file */  /* extract the basename of a file */
9565  static const char *tcc_basename(const char *name)  static const char *tcc_basename(const char *name)
9566  {  {
# Line 9596  void help(void) Line 9605  void help(void)
9605             "  -bench      output compilation statistics\n"             "  -bench      output compilation statistics\n"
9606             "  -run        run compiled source\n"             "  -run        run compiled source\n"
9607             "  -Wwarning   set or reset (with 'no-' prefix) 'warning'\n"             "  -Wwarning   set or reset (with 'no-' prefix) 'warning'\n"
9608               "  -w          disable all warnings\n"
9609             "Preprocessor options:\n"             "Preprocessor options:\n"
9610             "  -Idir       add include path 'dir'\n"             "  -Idir       add include path 'dir'\n"
9611             "  -Dsym[=val] define 'sym' with value 'val'\n"             "  -Dsym[=val] define 'sym' with value 'val'\n"
# Line 9652  enum { Line 9662  enum {
9662      TCC_OPTION_rdynamic,      TCC_OPTION_rdynamic,
9663      TCC_OPTION_run,      TCC_OPTION_run,
9664      TCC_OPTION_v,      TCC_OPTION_v,
9665        TCC_OPTION_w,
9666  };  };
9667    
9668  static const TCCOption tcc_options[] = {  static const TCCOption tcc_options[] = {
# Line 9684  static const TCCOption tcc_options[] = { Line 9695  static const TCCOption tcc_options[] = {
9695      { "nostdlib", TCC_OPTION_nostdlib, 0 },      { "nostdlib", TCC_OPTION_nostdlib, 0 },
9696      { "print-search-dirs", TCC_OPTION_print_search_dirs, 0 },      { "print-search-dirs", TCC_OPTION_print_search_dirs, 0 },
9697      { "v", TCC_OPTION_v, 0 },      { "v", TCC_OPTION_v, 0 },
9698        { "w", TCC_OPTION_w, 0 },
9699      { NULL },      { NULL },
9700  };  };
9701    
# Line 9859  int main(int argc, char **argv) Line 9871  int main(int argc, char **argv)
9871                          goto unsupported_option;                          goto unsupported_option;
9872                  }                  }
9873                  break;                  break;
9874                case TCC_OPTION_w:
9875                    tcc_reset_warnings(s);
9876                    break;
9877              case TCC_OPTION_rdynamic:              case TCC_OPTION_rdynamic:
9878                  s->rdynamic = 1;                  s->rdynamic = 1;
9879                  break;                  break;

Legend:
Removed from v.1.142  
changed lines
  Added in v.1.143

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26