⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 toplev.c

📁 gcc库的原代码,对编程有很大帮助.
💻 C
📖 第 1 页 / 共 5 页
字号:
	v_warning_with_decl (decl, s, ap);    }}voidpedwarn_with_decl VPROTO((tree decl, char *s, ...)){#ifndef __STDC__  tree decl;  char *s;#endif  va_list ap;  VA_START (ap, s);#ifndef __STDC__  decl = va_arg (ap, tree);  s = va_arg (ap, char *);#endif  v_pedwarn_with_decl (decl, s, ap);  va_end (ap);}static voidv_pedwarn_with_file_and_line (file, line, s, ap)     char *file;     int line;     char *s;     va_list ap;{  if (flag_pedantic_errors)    v_error_with_file_and_line (file, line, s, ap);  else    v_warning_with_file_and_line (file, line, s, ap);}voidpedwarn_with_file_and_line VPROTO((char *file, int line, char *s, ...)){#ifndef __STDC__  char *file;  int line;  char *s;#endif  va_list ap;  VA_START (ap, s);#ifndef __STDC__  file = va_arg (ap, char *);  line = va_arg (ap, int);  s = va_arg (ap, char *);#endif  v_pedwarn_with_file_and_line (file, line, s, ap);  va_end (ap);}/* Apologize for not implementing some feature.  */static voidvsorry (s, ap)     char *s;     va_list ap;{  sorrycount++;  if (input_filename)    fprintf (stderr, "%s:%d: ", input_filename, lineno);  else    fprintf (stderr, "%s: ", progname);  vmessage ("sorry, not implemented", s, ap);  fputc ('\n', stderr);}voidsorry VPROTO((char *s, ...)){#ifndef __STDC__  char *s;#endif  va_list ap;  VA_START (ap, s);#ifndef __STDC__  s = va_arg (ap, char *);#endif  vsorry (s, ap);  va_end (ap);}/* Apologize for not implementing some feature, then quit.  */static voidv_really_sorry (s, ap)     char *s;     va_list ap;{  sorrycount++;  if (input_filename)    fprintf (stderr, "%s:%d: ", input_filename, lineno);  else    fprintf (stderr, "%s: ", progname);  vmessage ("sorry, not implemented", s, ap);  fatal (" (fatal)\n");}voidreally_sorry VPROTO((char *s, ...)){#ifndef __STDC__  char *s;#endif  va_list ap;  VA_START (ap, s);#ifndef __STDC__  s = va_arg (ap, char *);#endif  v_really_sorry (s, ap);  va_end (ap);}/* More 'friendly' abort that prints the line and file.   config.h can #define abort fancy_abort if you like that sort of thing.   I don't think this is actually a good idea.   Other sorts of crashes will look a certain way.   It is a good thing if crashes from calling abort look the same way.     -- RMS  */voidfancy_abort (){  fatal ("internal gcc abort");}/* This calls abort and is used to avoid problems when abort if a macro.   It is used when we need to pass the address of abort.  */voiddo_abort (){  abort ();}/* When `malloc.c' is compiled with `rcheck' defined,   it calls this function to report clobberage.  */voidbotch (s){  abort ();}/* Same as `malloc' but report error if no memory available.  */char *xmalloc (size)     unsigned size;{  register char *value = (char *) malloc (size);  if (value == 0)    fatal ("virtual memory exhausted");  return value;}/* Same as `realloc' but report error if no memory available.  */char *xrealloc (ptr, size)     char *ptr;     int size;{  char *result = (char *) realloc (ptr, size);  if (!result)    fatal ("virtual memory exhausted");  return result;}/* Return the logarithm of X, base 2, considering X unsigned,   if X is a power of 2.  Otherwise, returns -1.   This should be used via the `exact_log2' macro.  */intexact_log2_wide (x)     register unsigned HOST_WIDE_INT x;{  register int log = 0;  /* Test for 0 or a power of 2.  */  if (x == 0 || x != (x & -x))    return -1;  while ((x >>= 1) != 0)    log++;  return log;}/* Given X, an unsigned number, return the largest int Y such that 2**Y <= X.   If X is 0, return -1.   This should be used via the floor_log2 macro.  */intfloor_log2_wide (x)     register unsigned HOST_WIDE_INT x;{  register int log = -1;  while (x != 0)    log++,    x >>= 1;  return log;}int float_handled;jmp_buf float_handler;/* Specify where to longjmp to when a floating arithmetic error happens.   If HANDLER is 0, it means don't handle the errors any more.  */voidset_float_handler (handler)     jmp_buf handler;{  float_handled = (handler != 0);  if (handler)    bcopy ((char *) handler, (char *) float_handler, sizeof (float_handler));}/* Specify, in HANDLER, where to longjmp to when a floating arithmetic   error happens, pushing the previous specification into OLD_HANDLER.   Return an indication of whether there was a previous handler in effect.  */intpush_float_handler (handler, old_handler)     jmp_buf handler, old_handler;{  int was_handled = float_handled;  float_handled = 1;  if (was_handled)    bcopy ((char *) float_handler, (char *) old_handler,	   sizeof (float_handler));  bcopy ((char *) handler, (char *) float_handler, sizeof (float_handler));  return was_handled;}/* Restore the previous specification of whether and where to longjmp to   when a floating arithmetic error happens.  */voidpop_float_handler (handled, handler)     int handled;     jmp_buf handler;{  float_handled = handled;  if (handled)    bcopy ((char *) handler, (char *) float_handler, sizeof (float_handler));}/* Signals actually come here.  */static voidfloat_signal (signo)     /* If this is missing, some compilers complain.  */     int signo;{  if (float_handled == 0)    abort ();#if defined (USG) || defined (hpux)  signal (SIGFPE, float_signal);  /* re-enable the signal catcher */#endif  float_handled = 0;  signal (SIGFPE, float_signal);  longjmp (float_handler, 1);}/* Handler for SIGPIPE.  */static voidpipe_closed (signo)     /* If this is missing, some compilers complain.  */     int signo;{  fatal ("output pipe has been closed");}/* Strip off a legitimate source ending from the input string NAME of   length LEN.  Rather than having to know the names used by all of   our front ends, we strip off an ending of a period followed by one,   two, or three characters.  */voidstrip_off_ending (name, len)     char *name;     int len;{  if (len > 2 && name[len - 2] == '.')    name[len - 2] = '\0';  else if (len > 3 && name[len - 3] == '.')    name[len - 3] = '\0';  else if (len > 4 && name[len - 4] == '.')    name[len - 4] = '\0';}/* Output a quoted string.  */voidoutput_quoted_string (asm_file, string)     FILE *asm_file;     char *string;{  char c;  putc ('\"', asm_file);  while ((c = *string++) != 0)    {      if (c == '\"' || c == '\\')	putc ('\\', asm_file);      putc (c, asm_file);    }  putc ('\"', asm_file);}/* Output a file name in the form wanted by System V.  */voidoutput_file_directive (asm_file, input_name)     FILE *asm_file;     char *input_name;{  int len = strlen (input_name);  char *na = input_name + len;  /* NA gets INPUT_NAME sans directory names.  */  while (na > input_name)    {      if (na[-1] == '/')	break;      na--;    }#ifdef ASM_OUTPUT_MAIN_SOURCE_FILENAME  ASM_OUTPUT_MAIN_SOURCE_FILENAME (asm_file, na);#else#ifdef ASM_OUTPUT_SOURCE_FILENAME  ASM_OUTPUT_SOURCE_FILENAME (asm_file, na);#else  fprintf (asm_file, "\t.file\t");  output_quoted_string (asm_file, na);  fputc ('\n', asm_file);#endif#endif}/* Routine to build language identifier for object file. */static voidoutput_lang_identify (asm_out_file)     FILE *asm_out_file;{  int len = strlen (lang_identify ()) + sizeof ("__gnu_compiled_") + 1;  char *s = (char *) alloca (len);  sprintf (s, "__gnu_compiled_%s", lang_identify ());  ASM_OUTPUT_LABEL (asm_out_file, s);}/* Routine to open a dump file.  */static FILE *open_dump_file (base_name, suffix)     char *base_name;     char *suffix;{  FILE *f;  char *dumpname = (char *) alloca (strlen (base_name) + strlen (suffix) + 1);  strcpy (dumpname, base_name);  strcat (dumpname, suffix);  f = fopen (dumpname, "w");  if (f == 0)    pfatal_with_name (dumpname);  return f;}/* Compile an entire file of output from cpp, named NAME.   Write a file of assembly output and various debugging dumps.  */static voidcompile_file (name)     char *name;{  tree globals;  int start_time;  int name_specified = name != 0;  if (dump_base_name == 0)    dump_base_name = name ? name : "gccdump";  parse_time = 0;  varconst_time = 0;  integration_time = 0;  jump_time = 0;  cse_time = 0;  loop_time = 0;  cse2_time = 0;  flow_time = 0;  combine_time = 0;  sched_time = 0;  local_alloc_time = 0;  global_alloc_time = 0;  sched2_time = 0;  dbr_sched_time = 0;  shorten_branch_time = 0;  stack_reg_time = 0;  final_time = 0;  symout_time = 0;  dump_time = 0;  /* Open input file.  */  if (name == 0 || !strcmp (name, "-"))    {      finput = stdin;      name = "stdin";    }  else    finput = fopen (name, "r");  if (finput == 0)    pfatal_with_name (name);#ifdef IO_BUFFER_SIZE  setvbuf (finput, (char *) xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE);#endif  /* Initialize data in various passes.  */  init_obstacks ();  init_tree_codes ();  init_lex ();  /* Some of these really don't need to be called when generating bytecode,     but the options would have to be parsed first to know that. -bson */  init_rtl ();  init_emit_once (debug_info_level == DINFO_LEVEL_NORMAL		  || debug_info_level == DINFO_LEVEL_VERBOSE);  init_regs ();  init_decl_processing ();  init_optabs ();  init_stmt ();  init_expmed ();  init_expr_once ();  init_loop ();  init_reload ();  if (flag_caller_saves)    init_caller_save ();  /* If auxiliary info generation is desired, open the output file.     This goes in the same directory as the source file--unlike     all the other output files.  */  if (flag_gen_aux_info)    {      aux_info_file = fopen (aux_info_file_name, "w");      if (aux_info_file == 0)	pfatal_with_name (aux_info_file_name);    }  /* If rtl dump desired, open the output file.  */  if (rtl_dump)    rtl_dump_file = open_dump_file (dump_base_name, ".rtl");  /* If jump_opt dump desired, open the output file.  */  if (jump_opt_dump)    jump_opt_dump_file = open_dump_file (dump_base_name, ".jump");  /* If cse dump desired, open the output file.  */  if (cse_dump)    cse_dump_file = open_dump_file (dump_base_name, ".cse");  /* If loop dump desired, open the output file.  */  if (loop_dump)    loop_dump_file = open_dump_file (dump_base_name, ".loop");  /* If cse2 dump desired, open the output file.  */  if (cse2_dump)    cse2_dump_file = open_dump_file (dump_base_name, ".cse2");  /* If flow dump desired, open the output file.  */  if (flow_dump)    flow_dump_file = open_dump_file (dump_base_name, ".flow");  /* If combine dump desired, open the output file.  */  if (combine_dump)    combine_dump_file = open_dump_file (dump_base_name, ".combine");  /* If scheduling dump desired, open the output file.  */  if (sched_dump)    sched_dump_file = open_dump_file (dump_base_name, ".sched");  /* If local_reg dump desired, open the output file.  */  if (local_reg_dump)    local_reg_dump_file = open_dump_file (dump_base_name, ".lreg");  /* If global_reg dump desired, open the output file.  */  if (global_reg_dump)    global_reg_dump_file = open_dump_file (dump_base_name, ".greg");  /* If 2nd scheduling dump desired, open the output file.  */  if (sched2_dump)    sched2_dump_file = open_dump_file (dump_base_name, ".sched2");  /* If jump2_opt dump desired, open the output file.  */  if (jump2_opt_dump)    jump2_opt_dump_file = open_dump_file (dump_base_name, ".jump2");  /* If dbr_sched dump desired, open the output file.  */  if (dbr_sched_dump)    dbr_sched_dump_file = open_dump_file (dump_base_name, ".dbr");#ifdef STACK_REGS

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -