cpplib: Line map related improvements

Neil Booth neil@daikokuya.demon.co.uk
Mon Aug 6 13:05:00 GMT 2001


This patch is a pleasing cleanup that is possible because of line
maps.  First, we get rid of faked buffers and the problems they were
starting to cause.  This simplifies cpplib.c considerably.

Second, I've moved the code from cpperror.c that prints the include
stack to line-map.c.  It more properly belongs there, since it can be
shared by other customers, and it is also simpler.  We get a further
win thrown in, too.  If a source file has

diagnostic-causing-line A
#include <file-with-no-diagnostics>
diagnostic-causing-line B

then existing code prints the include stack twice, even though it is
the same for both cases.  It is trivial for the line mapping code to
only reprint it if it would be different to the previous print.

Now that cpplib cannot check of linemarker flags, line-map.c doesn't
trust its input and sanity checks requested line map creations.

Also, a further minor cleanup of cppmain.c, and I've changed
stand-alone cpp to do allocated memory freeing, since performance is
not so important there, and I don't want the freeing code to suffer
bit rot.

Bootstrapped x86 Linux, making check.

Neil.

	* cpperror.c (print_containing_files): Moved to line-map.c.
	(print_location): line-map.c handles re-listing or otherwise.
	* cpphash.h (struct lexer_state): Remove next_bol.
	(struct cpp_buffer): Remove include_stack_listed.
	* cppline.c (do_line, cpp_push_buffer, _cpp_pop_buffer):
	Remove faked buffer handling.
	(_cpp_do_file_change): Tweak.
	* cpplib.h (enum cpp_buffer_type): Remove BUF_FAKE.
	* cppmain.c (struct printer): Remove filename.
	(print_line, cb_file_change): Update accordingly.
	* line-map.c: Include intl.h.
	(free_line_maps): Sanity check, warn if ENABLED_CHECKING.
	(add_line_map): Sanity check inputs, warn if ENABLED_CHECKING.
	(print_containing_files): New.
	* line-map.h (struct line_maps): New member last_listed.
	(print_containing_files, INCLUDED_FROM): New.
	* Makefile.in: Update.

============================================================
Index: gcc/cpperror.c
*** cpperror.c	2001/08/05 17:31:22	1.49
--- gcc/cpperror.c	2001/08/06 19:20:49
*************** Foundation, 59 Temple Place - Suite 330,
*** 29,36 ****
  #include "cpphash.h"
  #include "intl.h"
  
- static void print_containing_files	PARAMS ((struct line_map *,
- 						 struct line_map *));
  static void print_location		PARAMS ((cpp_reader *,
  						 const char *,
  						 const cpp_lexer_pos *));
--- 29,34 ----
*************** static void print_location		PARAMS ((cpp
*** 40,89 ****
  #define v_message(msgid, ap) \
   do { vfprintf (stderr, _(msgid), ap); putc ('\n', stderr); } while (0)
  
- /* Print the file names and line numbers of the #include
-    commands which led to the current file.  */
  static void
- print_containing_files (map_array, map)
-      struct line_map *map_array;
-      struct line_map *map;
- {
-   int first = 1;
- 
-   for (;;)
-     {
-       if (MAIN_FILE_P (map))
- 	break;
-       map = &map_array[map->included_from];
- 
-       if (first)
- 	{
- 	  first = 0;
- 	  /* The current line in each outer source file is now the
- 	     same as the line of the #include.  */
- 	  fprintf (stderr,  _("In file included from %s:%u"),
- 		   map->to_file, LAST_SOURCE_LINE (map));
- 	}
-       else
- 	/* Translators note: this message is used in conjunction
- 	   with "In file included from %s:%ld" and some other
- 	   tricks.  We want something like this:
- 
- 	   | In file included from sys/select.h:123,
- 	   |                  from sys/types.h:234,
- 	   |                  from userfile.c:31:
- 	   | bits/select.h:45: <error message here>
- 
- 	   with all the "from"s lined up.
- 	   The trailing comma is at the beginning of this message,
- 	   and the trailing colon is not translated.  */
- 	fprintf (stderr, _(",\n                 from %s:%u"),
- 		 map->to_file, LAST_SOURCE_LINE (map));
-     }
- 
-   fputs (":\n", stderr);
- }
- 
- static void
  print_location (pfile, filename, pos)
       cpp_reader *pfile;
       const char *filename;
--- 38,44 ----
*************** print_location (pfile, filename, pos)
*** 122,133 ****
  	  if (col == 0)
  	    col = 1;
  
! 	  /* Don't repeat the include stack unnecessarily.  */
! 	  if (buffer->prev && ! buffer->include_stack_listed)
! 	    {
! 	      buffer->include_stack_listed = 1;
! 	      print_containing_files (pfile->line_maps.maps, map);
! 	    }
  	}
  
        if (filename == 0)
--- 77,83 ----
  	  if (col == 0)
  	    col = 1;
  
! 	  print_containing_files (&pfile->line_maps, map);
  	}
  
        if (filename == 0)
============================================================
Index: gcc/cpphash.h
*** cpphash.h	2001/08/05 17:31:22	1.113
--- gcc/cpphash.h	2001/08/06 19:20:51
*************** struct lexer_state
*** 131,139 ****
       all directives apart from #define.  */
    unsigned char save_comments;
  
-   /* If nonzero the next token is at the beginning of the line.  */
-   unsigned char next_bol;
- 
    /* Nonzero if we're mid-comment.  */
    unsigned char lexing_comment;
  
--- 131,136 ----
*************** struct cpp_buffer
*** 218,227 ****
  
    /* 1 = system header file, 2 = C system header file used for C++.  */
    unsigned char sysp;
- 
-   /* Nonzero means we have printed (while error reporting) a list of
-      containing files that matches the current status.  */
-   unsigned char include_stack_listed;
  
    /* Nonzero means that the directory to start searching for ""
       include files has been calculated and stored in "dir" below.  */
--- 215,220 ----
============================================================
Index: gcc/cpplib.c
*** cpplib.c	2001/08/05 23:09:44	1.263
--- gcc/cpplib.c	2001/08/06 19:21:05
*************** do_line (pfile)
*** 736,747 ****
    cpp_get_token (pfile, &token);
    if (token.type == CPP_STRING)
      {
!       const char *fname = (const char *) token.val.str.text;
  
        /* Only accept flags for the # 55 form.  */
!       if (! pfile->state.line_extension)
! 	check_eol (pfile);
!       else
  	{
  	  int flag = 0, sysp = 0;
  
--- 736,745 ----
    cpp_get_token (pfile, &token);
    if (token.type == CPP_STRING)
      {
!       buffer->nominal_fname = (const char *) token.val.str.text;
  
        /* Only accept flags for the # 55 form.  */
!       if (pfile->state.line_extension)
  	{
  	  int flag = 0, sysp = 0;
  
*************** do_line (pfile)
*** 749,754 ****
--- 747,754 ----
  	  if (flag == 1)
  	    {
  	      reason = LC_ENTER;
+ 	      /* Fake an include for cpp_included ().  */
+ 	      _cpp_fake_include (pfile, buffer->nominal_fname);
  	      flag = read_flag (pfile, flag);
  	    }
  	  else if (flag == 2)
*************** do_line (pfile)
*** 761,803 ****
  	      sysp = 1;
  	      flag = read_flag (pfile, flag);
  	      if (flag == 4)
! 		sysp = 2, read_flag (pfile, flag);
! 	    }
! 
! 	  if (reason == LC_ENTER)
! 	    {
! 	      /* Fake a buffer stack for diagnostics.  */
! 	      cpp_push_buffer (pfile, 0, 0, BUF_FAKE, fname, 0);
! 	      /* Fake an include for cpp_included.  */
! 	      _cpp_fake_include (pfile, fname);
! 	      buffer = pfile->buffer;
! 	    }
! 	  else if (reason == LC_LEAVE)
! 	    {
! 	      if (buffer->type != BUF_FAKE)
! 		{
! 		  cpp_warning (pfile, "file \"%s\" left but not entered",
! 			       buffer->nominal_fname);
! 		  reason = LC_RENAME;
! 		}
! 	      else
! 		{
! 		  _cpp_pop_buffer (pfile);
! 		  pfile->lexer_pos.output_line++;
! 		  buffer = pfile->buffer;
! #ifdef ENABLE_CHECKING
! 		  if (strcmp (buffer->nominal_fname, fname))
! 		    cpp_warning (pfile, "expected to return to file \"%s\"",
! 				 buffer->nominal_fname);
! 		  if (buffer->sysp != sysp)
! 		    cpp_warning (pfile, "header flags for \"%s\" have changed",
! 				 buffer->nominal_fname);
! #endif
! 		}
  	    }
  	  buffer->sysp = sysp;
  	}
!       buffer->nominal_fname = fname;
      }
    else if (token.type != CPP_EOF)
      {
--- 761,771 ----
  	      sysp = 1;
  	      flag = read_flag (pfile, flag);
  	      if (flag == 4)
! 		sysp = 2;
  	    }
  	  buffer->sysp = sysp;
  	}
!       check_eol (pfile);
      }
    else if (token.type != CPP_EOF)
      {
*************** _cpp_do_file_change (pfile, reason, file
*** 818,826 ****
       enum lc_reason reason;
       unsigned int file_line;
  {
!   cpp_buffer *buffer;
! 
!   buffer = pfile->buffer;
    pfile->map = add_line_map (&pfile->line_maps, reason,
  			     pfile->line, buffer->nominal_fname, file_line);
  
--- 786,793 ----
       enum lc_reason reason;
       unsigned int file_line;
  {
!   cpp_buffer *buffer = pfile->buffer;
!   
    pfile->map = add_line_map (&pfile->line_maps, reason,
  			     pfile->line, buffer->nominal_fname, file_line);
  
*************** cpp_push_buffer (pfile, buffer, len, typ
*** 1785,1820 ****
  {
    cpp_buffer *new = xobnew (&pfile->buffer_ob, cpp_buffer);
  
!   if (type == BUF_FAKE)
!     {
!       /* A copy of the current buffer, just with a new name and type.  */
!       memcpy (new, pfile->buffer, sizeof (cpp_buffer));
!       new->type = BUF_FAKE;
!     }
!   else
!     {
!       if (type == BUF_BUILTIN)
! 	filename = _("<builtin>");
!       else if (type == BUF_CL_OPTION)
! 	filename = _("<command line>");
!       else if (type == BUF_PRAGMA)
! 	filename = "<_Pragma>";
! 
!       /* Clears, amongst other things, if_stack and mi_cmacro.  */
!       memset (new, 0, sizeof (cpp_buffer));
! 
!       new->line_base = new->buf = new->cur = buffer;
!       new->rlimit = buffer + len;
!       new->sysp = 0;
! 
!       /* No read ahead or extra char initially.  */
!       new->read_ahead = EOF;
!       new->extra_char = EOF;
! 
!       /* Preprocessed files, builtins, _Pragma and command line
! 	 options don't do trigraph and escaped newline processing.  */
!       new->from_stage3 = type != BUF_FILE || CPP_OPTION (pfile, preprocessed);
!     }
  
    if (*filename == '\0')
      new->nominal_fname = _("<stdin>");
--- 1752,1778 ----
  {
    cpp_buffer *new = xobnew (&pfile->buffer_ob, cpp_buffer);
  
!   if (type == BUF_BUILTIN)
!     filename = _("<builtin>");
!   else if (type == BUF_CL_OPTION)
!     filename = _("<command line>");
!   else if (type == BUF_PRAGMA)
!     filename = "<_Pragma>";
! 
!   /* Clears, amongst other things, if_stack and mi_cmacro.  */
!   memset (new, 0, sizeof (cpp_buffer));
! 
!   new->line_base = new->buf = new->cur = buffer;
!   new->rlimit = buffer + len;
!   new->sysp = 0;
! 
!   /* No read ahead or extra char initially.  */
!   new->read_ahead = EOF;
!   new->extra_char = EOF;
! 
!   /* Preprocessed files, builtins, _Pragma and command line
!      options don't do trigraph and escaped newline processing.  */
!   new->from_stage3 = type != BUF_FILE || CPP_OPTION (pfile, preprocessed);
  
    if (*filename == '\0')
      new->nominal_fname = _("<stdin>");
*************** cpp_push_buffer (pfile, buffer, len, typ
*** 1823,1832 ****
    new->type = type;
    new->prev = pfile->buffer;
    new->pfile = pfile;
-   new->include_stack_listed = 0;
    new->return_at_eof = return_at_eof;
  
-   pfile->state.next_bol = 1;
    pfile->buffer_stack_depth++;
    pfile->buffer = new;
  
--- 1781,1788 ----
*************** void
*** 1840,1888 ****
  _cpp_pop_buffer (pfile)
       cpp_reader *pfile;
  {
!   cpp_buffer *buffer;
    struct if_stack *ifs;
- 
-   for (;;)
-     {
-       buffer = pfile->buffer;
-       /* Walk back up the conditional stack till we reach its level at
- 	 entry to this file, issuing error messages.  */
-       for (ifs = buffer->if_stack; ifs; ifs = ifs->next)
- 	cpp_error_with_line (pfile, ifs->pos.line, ifs->pos.col,
- 			     "unterminated #%s", dtable[ifs->type].name);
- 
-       if (buffer->type == BUF_FAKE)
- 	{
- 	  buffer->prev->cur = buffer->cur;
- 	  buffer->prev->line_base = buffer->line_base;
- 	  buffer->prev->read_ahead = buffer->read_ahead;
- 	}
-       else if (buffer->type == BUF_FILE)
- 	_cpp_pop_file_buffer (pfile, buffer);
- 
-       pfile->buffer = buffer->prev;
-       pfile->buffer_stack_depth--;
  
!       /* Callbacks only generated for faked or real files.  */
!       if (buffer->type != BUF_FILE && buffer->type != BUF_FAKE)
! 	break;
! 	  
!       /* No callback for EOF of last file.  */
!       if (!pfile->buffer)
! 	break;
! 
!       /* do_line does its own call backs.  */
!       pfile->buffer->include_stack_listed = 0;
!       if (pfile->directive == &dtable[T_LINE])
! 	break;
! 
!       _cpp_do_file_change (pfile, LC_LEAVE, pfile->buffer->return_to_line);
!       if (pfile->buffer->type == BUF_FILE)
! 	break;
  
!       cpp_warning (pfile, "file \"%s\" entered but not left",
! 		   buffer->nominal_fname);
      }
  
    obstack_free (&pfile->buffer_ob, buffer);
--- 1796,1821 ----
  _cpp_pop_buffer (pfile)
       cpp_reader *pfile;
  {
!   cpp_buffer *buffer = pfile->buffer;
    struct if_stack *ifs;
  
!   /* Walk back up the conditional stack till we reach its level at
!      entry to this file, issuing error messages.  */
!   for (ifs = buffer->if_stack; ifs; ifs = ifs->next)
!     cpp_error_with_line (pfile, ifs->pos.line, ifs->pos.col,
! 			 "unterminated #%s", dtable[ifs->type].name);
! 
!   /* Update the reader's buffer before _cpp_do_file_change.  */
!   pfile->buffer = buffer->prev;
!   pfile->buffer_stack_depth--;
! 
!   if (buffer->type == BUF_FILE)
!     {
!       /* Callbacks are not generated for popping the main file.  */
!       if (buffer->prev)
! 	_cpp_do_file_change (pfile, LC_LEAVE, buffer->prev->return_to_line);
  
!       _cpp_pop_file_buffer (pfile, buffer);
      }
  
    obstack_free (&pfile->buffer_ob, buffer);
============================================================
Index: gcc/cpplib.h
*** cpplib.h	2001/08/04 16:28:14	1.182
--- gcc/cpplib.h	2001/08/06 19:21:06
*************** struct cpp_callbacks
*** 416,425 ****
  /* Name under which this program was invoked.  */
  extern const char *progname;
  
! /* Where does this buffer come from?  A faked include, a source file,
!    a builtin macro, a command-line option, or a _Pragma operator.  */
! enum cpp_buffer_type {BUF_FAKE, BUF_FILE, BUF_BUILTIN,
! 		      BUF_CL_OPTION, BUF_PRAGMA};
  
  /* The structure of a node in the hash table.  The hash table has
     entries for all identifiers: either macros defined by #define
--- 416,424 ----
  /* Name under which this program was invoked.  */
  extern const char *progname;
  
! /* Where does this buffer come from?  A source file, a builtin macro,
!    a command-line option, or a _Pragma operator.  */
! enum cpp_buffer_type {BUF_FILE, BUF_BUILTIN, BUF_CL_OPTION, BUF_PRAGMA};
  
  /* The structure of a node in the hash table.  The hash table has
     entries for all identifiers: either macros defined by #define
============================================================
Index: gcc/cppmain.c
*** cppmain.c	2001/08/05 17:31:23	1.72
--- gcc/cppmain.c	2001/08/06 19:21:06
*************** Foundation, 59 Temple Place - Suite 330,
*** 31,37 ****
  struct printer
  {
    FILE *outf;			/* Stream to write to.  */
-   const char *filename;		/* Name of current file.  */
    const char *syshdr_flags;	/* System header flags, if any.  */
    unsigned int line;		/* Line currently being written.  */
    unsigned char printed;	/* Nonzero if something output at line.  */
--- 31,36 ----
*************** main (argc, argv)
*** 81,88 ****
    
    do_preprocessing (argc, argv);
  
!   /* Call to cpp_destroy () omitted for performance reasons.  */
!   if (cpp_errors (pfile))
      return FATAL_EXIT_CODE;
  
    return SUCCESS_EXIT_CODE;
--- 80,86 ----
    
    do_preprocessing (argc, argv);
  
!   if (cpp_destroy (pfile))
      return FATAL_EXIT_CODE;
  
    return SUCCESS_EXIT_CODE;
*************** print_line (line, special_flags)
*** 328,334 ****
    if (! options->no_line_commands)
      fprintf (print.outf, "# %u \"%s\"%s%s\n",
  	     SOURCE_LINE (print.map, print.line),
! 	     print.filename, special_flags, print.syshdr_flags);
  }
  
  /* Callbacks.  */
--- 326,332 ----
    if (! options->no_line_commands)
      fprintf (print.outf, "# %u \"%s\"%s%s\n",
  	     SOURCE_LINE (print.map, print.line),
! 	     print.map->to_file, special_flags, print.syshdr_flags);
  }
  
  /* Callbacks.  */
*************** cb_file_change (pfile, fc)
*** 400,406 ****
      maybe_print_line (fc->line - 1);
  
    print.map = fc->map;
-   print.filename = fc->map->to_file;
    if (fc->externc)
      print.syshdr_flags = " 3 4";
    else if (fc->sysp)
--- 398,403 ----
============================================================
Index: gcc/line-map.c
*** line-map.c	2001/08/05 21:31:28	1.2
--- gcc/line-map.c	2001/08/06 19:21:06
*************** Foundation, 59 Temple Place - Suite 330,
*** 23,28 ****
--- 23,29 ----
  #include "config.h"
  #include "system.h"
  #include "line-map.h"
+ #include "intl.h"
  
  /* Initialize a line map set.  */
  
*************** init_line_maps (set)
*** 33,47 ****
    set->maps = 0;
    set->allocated = 0;
    set->used = 0;
  }
  
  /* Free a line map set.  */
  
! void free_line_maps (set)
       struct line_maps *set;
  {
    if (set->maps)
!     free (set->maps);
  }
  
  /* Add a mapping of logical source line to physical source file and
--- 34,60 ----
    set->maps = 0;
    set->allocated = 0;
    set->used = 0;
+   set->last_listed = -1;
  }
  
  /* Free a line map set.  */
  
! void
! free_line_maps (set)
       struct line_maps *set;
  {
    if (set->maps)
!     {
! #ifdef ENABLE_CHECKING
!       struct line_map *map;
! 
!       for (map = CURRENT_LINE_MAP (set); ! MAIN_FILE_P (map);
! 	   map = INCLUDED_FROM (set, map))
! 	fprintf (stderr, "line-map.c: file \"%s\" entered but not left\n",
! 		 map->to_file);
! #endif
!       free (set->maps);
!     }
  }
  
  /* Add a mapping of logical source line to physical source file and
*************** add_line_map (set, reason, from_line, to
*** 76,93 ****
    map->to_file = to_file;
    map->to_line = to_line;
  
    if (set->used == 0)
!     map->included_from = -1;
!   else if (reason == LC_ENTER)
      map->included_from = set->used - 1;
    else if (reason == LC_RENAME)
      map->included_from = map[-1].included_from;
    else if (reason == LC_LEAVE)
!     {
!       if (map[-1].included_from < 0)
! 	abort ();
!       map->included_from = set->maps[map[-1].included_from].included_from;
!     }
  
    set->used++;
    return map;
--- 89,117 ----
    map->to_file = to_file;
    map->to_line = to_line;
  
+   /* If we don't keep our line maps consistent, we can easily
+      segfault.  Don't rely on the client to do it for us.  */
    if (set->used == 0)
!     reason = LC_ENTER;
!   else if (reason == LC_LEAVE)
!     {
!       if (MAIN_FILE_P (map - 1)
! 	  || strcmp (INCLUDED_FROM (set, map - 1)->to_file, to_file))
! 	{
! #ifdef ENABLE_CHECKING
! 	  fprintf (stderr, "line-map.c: file \"%s\" left but not entered\n",
! 		   to_file);
! #endif
! 	  reason = LC_RENAME;
! 	}
!     }
! 
!   if (reason == LC_ENTER)
      map->included_from = set->used - 1;
    else if (reason == LC_RENAME)
      map->included_from = map[-1].included_from;
    else if (reason == LC_LEAVE)
!     map->included_from = INCLUDED_FROM (set, map - 1)->included_from;
  
    set->used++;
    return map;
*************** lookup_line (set, line)
*** 118,121 ****
--- 142,185 ----
      }
  
    return &set->maps[mn];
+ }
+ 
+ /* Print the file names and line numbers of the #include commands
+    which led to the map MAP, if any, to stderr.  Nothing is output if
+    the most recently listed stack is the same as the current one.  */
+ 
+ void
+ print_containing_files (set, map)
+      struct line_maps *set;
+      struct line_map *map;
+ {
+   if (MAIN_FILE_P (map) || set->last_listed == map->included_from)
+     return;
+ 
+   set->last_listed = map->included_from;
+   map = INCLUDED_FROM (set, map);
+ 
+   fprintf (stderr,  _("In file included from %s:%u"),
+ 	   map->to_file, LAST_SOURCE_LINE (map));
+ 
+   while (! MAIN_FILE_P (map))
+     {
+       map = INCLUDED_FROM (set, map);
+       /* Translators note: this message is used in conjunction
+ 	 with "In file included from %s:%ld" and some other
+ 	 tricks.  We want something like this:
+ 
+ 	 | In file included from sys/select.h:123,
+ 	 |                  from sys/types.h:234,
+ 	 |                  from userfile.c:31:
+ 	 | bits/select.h:45: <error message here>
+ 
+ 	 with all the "from"s lined up.
+ 	 The trailing comma is at the beginning of this message,
+ 	 and the trailing colon is not translated.  */
+       fprintf (stderr, _(",\n                 from %s:%u"),
+ 	       map->to_file, LAST_SOURCE_LINE (map));
+     }
+ 
+   fputs (":\n", stderr);
  }
============================================================
Index: gcc/line-map.h
*** line-map.h	2001/08/05 21:31:28	1.4
--- gcc/line-map.h	2001/08/06 19:21:07
*************** struct line_maps
*** 42,47 ****
--- 42,52 ----
    struct line_map *maps;
    unsigned int allocated;
    unsigned int used;
+ 
+   /* The most recently listed include stack, if any, starts with
+      LAST_LISTED as the topmost including file.  -1 indicates nothing
+      has been listed yet.  */
+   int last_listed;
  };
  
  /* Reason for adding a line change with add_line_map ().  LC_ENTER is
*************** extern struct line_map *add_line_map
*** 74,85 ****
--- 79,99 ----
  extern struct line_map *lookup_line
    PARAMS ((struct line_maps *, unsigned int));
  
+ /* Print the file names and line numbers of the #include commands
+    which led to the map MAP, if any, to stderr.  Nothing is output if
+    the most recently listed stack is the same as the current one.  */
+ extern void print_containing_files
+   PARAMS ((struct line_maps *, struct line_map *));
+ 
  /* Converts a map and logical line to source line.  */
  #define SOURCE_LINE(MAP, LINE) ((LINE) + (MAP)->to_line - (MAP)->from_line)
  
  /* Returns the last source line within a map.  This is the (last) line
     of the #include, or other directive, that caused a map change.  */
  #define LAST_SOURCE_LINE(MAP) SOURCE_LINE ((MAP), (MAP)[1].from_line - 1)
+ 
+ /* Returns the map a given map was included from.  */
+ #define INCLUDED_FROM(SET, MAP) (&(SET)->maps[(MAP)->included_from])
  
  /* Non-zero if the map is at the bottom of the include stack.  */
  #define MAIN_FILE_P(MAP) ((MAP)->included_from < 0)
============================================================
Index: gcc/Makefile.in
*** Makefile.in	2001/08/06 16:57:53	1.715
--- gcc/Makefile.in	2001/08/06 19:21:17
*************** stringpool.o: stringpool.c $(CONFIG_H) $
*** 1325,1331 ****
  
  hashtable.o: hashtable.c hashtable.h $(CONFIG_H) $(SYSTEM_H) $(OBSTACK_H)
  
! line-map.o: line-map.c line-map.h $(CONFIG_H) $(SYSTEM_H)
  
  ggc-none.o: ggc-none.c $(GCONFIG_H) $(SYSTEM_H) $(GGC_H)
  	$(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
--- 1325,1331 ----
  
  hashtable.o: hashtable.c hashtable.h $(CONFIG_H) $(SYSTEM_H) $(OBSTACK_H)
  
! line-map.o: line-map.c line-map.h intl.h $(CONFIG_H) $(SYSTEM_H)
  
  ggc-none.o: ggc-none.c $(GCONFIG_H) $(SYSTEM_H) $(GGC_H)
  	$(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
============================================================
Index: gcc/po/POTFILES.in
*** POTFILES.in	2001/08/01 10:37:59	1.52
--- gcc/po/POTFILES.in	2001/08/06 19:21:17
*************** lcm.c
*** 941,946 ****
--- 941,947 ----
  #libgcc2.h is part of the GCC library
  #limitx.h is part of the GCC library
  #limity.h is part of the GCC library
+ line-map.c
  lists.c
  local-alloc.c
  #longlong.h is part of the GCC library



More information about the Gcc-patches mailing list