preliminary patches for column number

Per Bothner bothner@cygnus.com
Mon Mar 29 18:02:00 GMT 1999


The following replaces the line number in various places
with a 32-bit struct containing both line *and* column number,
as we discussed earlier.  The patch is not complete, but
does allow cc1 to compile and link.  The main thing I want
feedback on before I finish this are the *names* I used.
For example:

* Is "linecol" a good name for the struct?
* Is "linecolno" a good replacement for "lineno"?
* Likewise for DECL_SOURCE_LINECOL, EXPR_WFL_LINECOL, rtlinecol,
NOTE_LINE_LINECOL, etc.
* Note the addition of emit_raw_note.  I don't know if it is needed.
It is mainly called by emit_note and emit_line_note, where emit_line_note
and emit_raw_note take a linecol, while emit_note takes an int.
There are a couple of places that call emit_note with a line number.
I changed those to call emit_raw_note, because I didn't know if it
was OK to change them to call emit_line_note instead.

Index: machmode.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/machmode.h,v
retrieving revision 1.12
diff -u -p -r1.12 machmode.h
--- machmode.h	1999/03/11 13:56:19	1.12
+++ machmode.h	1999/03/30 01:33:32
@@ -232,4 +232,14 @@ extern enum machine_mode byte_mode;
 extern enum machine_mode word_mode;
 extern enum machine_mode ptr_mode;
 
+/* Line and column values for a source location.
+   Values of zero mean unknown or missing, or (for a zero column number)
+   the entire line. */
+
+typedef struct linecol
+{
+  int line : 22;
+  unsigned int column : 10;
+} linecol;
+
 #endif /* not HAVE_MACHINE_MODES */
Index: tree.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/tree.h,v
retrieving revision 1.70
diff -u -p -r1.70 tree.h
--- tree.h	1999/03/06 05:34:16	1.70
+++ tree.h	1999/03/30 01:33:33
@@ -682,7 +682,7 @@ struct tree_vec
 
 /* In ordinary expression nodes.  */
 #define TREE_OPERAND(NODE, I) (EXPR_CHECK (NODE)->exp.operands[I])
-#define TREE_COMPLEXITY(NODE) (EXPR_CHECK (NODE)->exp.complexity)
+#define TREE_COMPLEXITY(NODE) (EXPR_CHECK (NODE)->exp.u.complexity)
 
 /* In a LABELED_BLOCK_EXPR node.  */
 #define LABELED_BLOCK_LABEL(NODE) TREE_OPERAND (NODE, 0)
@@ -699,17 +699,20 @@ struct tree_vec
 #define EXPR_WFL_NODE(NODE) TREE_OPERAND((NODE), 0)
 #define EXPR_WFL_FILENAME(NODE) (IDENTIFIER_POINTER ((NODE)->common.chain))
 #define EXPR_WFL_FILENAME_NODE(NODE) ((NODE)->common.chain)
-#define EXPR_WFL_LINENO(NODE) (EXPR_CHECK (NODE)->exp.complexity >> 12)
-#define EXPR_WFL_COLNO(NODE) (EXPR_CHECK (NODE)->exp.complexity & 0xfff)
-#define EXPR_WFL_LINECOL(NODE) (EXPR_CHECK (NODE)->exp.complexity)
+#define EXPR_WFL_LINENO(NODE) (EXPR_CHECK (NODE)->exp.u.linecolno.line)
+#define EXPR_WFL_COLNO(NODE) (EXPR_CHECK (NODE)->exp.u.linecolno.column)
+#define EXPR_WFL_LINECOL(NODE) (EXPR_CHECK (NODE)->exp.u.linecolno)
 #define EXPR_WFL_SET_LINECOL(NODE, LINE, COL) \
-  (EXPR_WFL_LINECOL(NODE) = ((LINE) << 12) | ((COL) & 0xfff))
+  (EXPR_WFL_LINENO (NODE) = (LINE), EXPR_WFL_COLNO (NODE) = (COL))
 #define EXPR_WFL_EMIT_LINE_NOTE(NODE) ((NODE)->common.public_flag)
 
 struct tree_exp
 {
   char common[sizeof (struct tree_common)];
-  int complexity;
+  union {
+    int complexity;
+    linecol linecolno;
+  } u;
   union tree_node *operands[1];
 };
 
@@ -1067,7 +1070,9 @@ struct tree_type
 #define DECL_QUALIFIER(NODE) (DECL_CHECK (NODE)->decl.initial)
 /* These two fields describe where in the source code the declaration was.  */
 #define DECL_SOURCE_FILE(NODE) (DECL_CHECK (NODE)->decl.filename)
-#define DECL_SOURCE_LINE(NODE) (DECL_CHECK (NODE)->decl.linenum)
+#define DECL_SOURCE_LINECOL(NODE) (DECL_CHECK (NODE)->decl.linecolnum)
+#define DECL_SOURCE_LINE(NODE) (DECL_CHECK (NODE)->decl.linecolnum.line)
+#define DECL_SOURCE_COLUMN(NODE) (DECL_CHECK (NODE)->decl.linecolnum.column)
 /* Holds the size of the datum, as a tree expression.
    Need not be constant.  */
 #define DECL_SIZE(NODE) (DECL_CHECK (NODE)->decl.size)
@@ -1282,7 +1287,7 @@ struct tree_decl
 {
   char common[sizeof (struct tree_common)];
   char *filename;
-  int linenum;
+  linecol linecolnum;
   unsigned int uid;
   union tree_node *size;
 #ifdef ONLY_INT_FIELDS
@@ -1846,8 +1851,16 @@ extern tree char_type_node;
    being parsed originally came (before it went into cpp).  */
 extern char *input_filename;
 
+/* Current line and column in input file.  */
+extern linecol linecolno;
+
 /* Current line number in input file.  */
-extern int lineno;
+/*#define lineno linecolno.line*/
+
+/* Current column number in input file.  */
+#define columnno linecolno.column
+
+extern linecol unknown_linecol;
 
 /* Nonzero for -pedantic switch: warn about anything
    that standard C forbids.  */
@@ -2158,7 +2171,7 @@ extern void print_obstack_statistics	PRO
 #ifdef BUFSIZ
 extern void print_obstack_name		PROTO ((char *, FILE *, const char *));
 #endif
-extern void expand_function_end		PROTO ((char *, int, int));
+extern void expand_function_end		PROTO ((char *, linecol, int));
 extern void expand_function_start	PROTO ((tree, int));
 extern int real_onep			PROTO ((tree));
 extern int real_twop			PROTO ((tree));
@@ -2178,7 +2191,7 @@ extern void setjmp_protect_args		PROTO (
 extern void setjmp_protect		PROTO ((tree));
 extern void expand_main_function	PROTO ((void));
 extern void mark_varargs		PROTO ((void));
-extern void init_function_start		PROTO ((tree, char *, int));
+extern void init_function_start		PROTO ((tree, char *, linecol));
 extern void assign_parms		PROTO ((tree, int));
 extern void put_var_into_stack		PROTO ((tree));
 extern void uninitialized_vars_warning	PROTO ((tree));
@@ -2229,8 +2242,8 @@ extern void check_max_integer_computatio
 extern void start_sequence_for_rtl_expr		PROTO ((tree));
 extern struct rtx_def *emit_line_note_after	PROTO ((char *, int,
 							struct rtx_def *));
-extern struct rtx_def *emit_line_note		PROTO ((char *, int));
-extern struct rtx_def *emit_line_note_force	PROTO ((char *, int));
+extern struct rtx_def *emit_line_note		PROTO ((char *, linecol));
+extern struct rtx_def *emit_line_note_force	PROTO ((char *, linecol));
 
 /* In c-typeck.c */
 extern int mark_addressable		PROTO ((tree));
@@ -2285,7 +2298,7 @@ extern void emit_nop			PROTO ((void));
 extern void expand_computed_goto	PROTO ((tree));
 extern struct rtx_def *label_rtx	PROTO ((tree));
 extern void expand_asm_operands		PROTO ((tree, tree, tree, tree, int,
-						char *, int));
+						char *, linecol));
 extern int any_pending_cleanups		PROTO ((int));
 extern void init_stmt			PROTO ((void));
 extern void init_stmt_for_function	PROTO ((void));
Index: rtl.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/rtl.h,v
retrieving revision 1.96
diff -u -p -r1.96 rtl.h
--- rtl.h	1999/03/28 17:33:20	1.96
+++ rtl.h	1999/03/30 01:33:33
@@ -91,6 +91,7 @@ typedef union rtunion_def
   addr_diff_vec_flags rt_addr_diff_vec_flags;
   struct bitmap_head_def *rtbit;
   union tree_node *rttree;
+  linecol rtlinecol;
   struct basic_block_def *bb;
 } rtunion;
 
@@ -227,6 +228,8 @@ typedef struct rtvec_def{
 
 #define XEXP(RTX, N)	((RTX)->fld[N].rtx)
 #define XINT(RTX, N)	((RTX)->fld[N].rtint)
+#define XLINECOL(RTX, N)((RTX)->fld[N].rtlinecol)
+#define XLINE(RTX, N)	((RTX)->fld[N].rtlinecol.line)
 #define XWINT(RTX, N)	((RTX)->fld[N].rtwint)
 #define XSTR(RTX, N)	((RTX)->fld[N].rtstr)
 #define XVEC(RTX, N)	((RTX)->fld[N].rtvec)
@@ -413,7 +416,8 @@ extern char *reg_note_name[];
 
 /* In a NOTE that is a line number, this is the line number.
    Other kinds of NOTEs are identified by negative numbers here.  */
-#define NOTE_LINE_NUMBER(INSN) ((INSN)->fld[4].rtint)
+#define NOTE_LINE_NUMBER(INSN) ((INSN)->fld[4].rtlinecol.line)
+#define NOTE_LINE_LINECOL(INSN) ((INSN)->fld[4].rtlinecol)
 
 /* Codes that appear in the NOTE_LINE_NUMBER field
    for kinds of notes that are not line numbers.
@@ -569,7 +573,8 @@ extern char *note_insn_name[];
 #define ASM_OPERANDS_INPUT_CONSTRAINT(RTX, N) XSTR (XVECEXP ((RTX), 4, (N)), 0)
 #define ASM_OPERANDS_INPUT_MODE(RTX, N) GET_MODE (XVECEXP ((RTX), 4, (N)))
 #define ASM_OPERANDS_SOURCE_FILE(RTX) XSTR ((RTX), 5)
-#define ASM_OPERANDS_SOURCE_LINE(RTX) XINT ((RTX), 6)
+#define ASM_OPERANDS_SOURCE_LINECOL(RTX) XLINECOL ((RTX), 6)
+#define ASM_OPERANDS_SOURCE_LINE(RTX) XLINE ((RTX), 6)
 
 /* For a MEM rtx, 1 if it's a volatile reference.
    Also in an ASM_OPERANDS rtx.  */
@@ -953,9 +958,10 @@ extern rtx emit_jump_insn		PROTO((rtx));
 extern rtx emit_call_insn		PROTO((rtx));
 extern rtx emit_label			PROTO((rtx));
 extern rtx emit_barrier			PROTO((void));
-extern rtx emit_line_note		PROTO((char *, int));
+extern rtx emit_line_note		PROTO((char *, linecol));
+extern rtx emit_raw_note		PROTO((char *, linecol));
 extern rtx emit_note			PROTO((char *, int));
-extern rtx emit_line_note_force		PROTO((char *, int));
+extern rtx emit_line_note_force		PROTO((char *, linecol));
 extern rtx make_insn_raw		PROTO((rtx));
 extern rtx previous_insn		PROTO((rtx));
 extern rtx next_insn			PROTO((rtx));
Index: c-common.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/c-common.c,v
retrieving revision 1.54
diff -u -p -r1.54 c-common.c
--- c-common.c	1999/03/11 00:57:46	1.54
+++ c-common.c	1999/03/30 01:33:28
@@ -77,7 +77,7 @@ static tree c_find_base_decl            
 typedef struct
 {
   int compstmt_count;
-  int line;
+  linecol line;
   const char *file;
   int needs_warning;
 } if_elt;
@@ -121,7 +121,7 @@ c_expand_start_cond (cond, exitflag, com
   /* Record this if statement.  */
   if_stack[if_stack_pointer].compstmt_count = compstmt_count;
   if_stack[if_stack_pointer].file = input_filename;
-  if_stack[if_stack_pointer].line = lineno;
+  if_stack[if_stack_pointer].line = linecolno;
   if_stack[if_stack_pointer].needs_warning = 0;
   if_stack_pointer++;
 
Index: c-decl.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/c-decl.c,v
retrieving revision 1.60
diff -u -p -r1.60 c-decl.c
--- c-decl.c	1999/02/18 20:38:36	1.60
+++ c-decl.c	1999/03/30 01:33:28
@@ -225,7 +225,7 @@ tree integer_one_node;
 tree pending_invalid_xref;
 /* File and line to appear in the eventual error message.  */
 char *pending_invalid_xref_file;
-int pending_invalid_xref_line;
+linecol pending_invalid_xref_linecol;
 
 /* While defining an enum type, this is 1 plus the last enumerator
    constant value.  Note that will do not have to save this or `enum_overflow'
@@ -261,7 +261,7 @@ static tree current_function_parm_tags;
 /* Similar, for the file and line that the prototype came from if this is
    an old-style definition.  */
 static char *current_function_prototype_file;
-static int current_function_prototype_line;
+static linecol current_function_prototype_linecol;
 
 /* A list (chain of TREE_LIST nodes) of all LABEL_DECLs in the function
    that have names.  Here so we can clear out their names' definitions
@@ -1246,7 +1246,7 @@ poplevel (keep, reverse, functionbody)
 	    {
 	      error_with_decl (label, "label `%s' used but not defined");
 	      /* Avoid crashing later.  */
-	      define_label (input_filename, lineno,
+	      define_label (input_filename, linecolno,
 			    DECL_NAME (label));
 	    }
 	  else if (warn_unused && !TREE_USED (label))
@@ -1407,7 +1407,7 @@ pop_label_level ()
 	      error_with_decl (TREE_VALUE (link),
 			       "label `%s' used but not defined");
 	      /* Avoid crashing later.  */
-	      define_label (input_filename, lineno,
+	      define_label (input_filename, linecolno,
 			    DECL_NAME (TREE_VALUE (link)));
 	    }
 	  else if (warn_unused && !TREE_USED (TREE_VALUE (link)))
@@ -1978,7 +1978,7 @@ duplicate_decls (newdecl, olddecl, diffe
       if (DECL_INITIAL (newdecl) == 0 && DECL_INITIAL (olddecl) != 0
 	  && ! different_binding_level)
 	{
-	  DECL_SOURCE_LINE (newdecl) = DECL_SOURCE_LINE (olddecl);
+	  DECL_SOURCE_LINECOL (newdecl) = DECL_SOURCE_LINECOL (olddecl);
 	  DECL_SOURCE_FILE (newdecl) = DECL_SOURCE_FILE (olddecl);
 	}
 
@@ -2166,7 +2166,7 @@ pushdecl (x)
   if (name)
     {
       char *file;
-      int line;
+      linecol linecolno;
       int different_binding_level = 0;
 
       t = lookup_name_current_level (name);
@@ -2192,7 +2192,7 @@ pushdecl (x)
       if (t != 0)
 	{
 	  file = DECL_SOURCE_FILE (t);
-	  line = DECL_SOURCE_LINE (t);
+	  linecolno = DECL_SOURCE_LINECOL (t);
 	}
 
       /* If this decl is `static' and an implicit decl was seen previously,
@@ -2211,7 +2211,7 @@ pushdecl (x)
 		   IDENTIFIER_POINTER (name));
 	  pedwarn_with_file_and_line
 	    (DECL_SOURCE_FILE (IDENTIFIER_IMPLICIT_DECL (name)),
-	     DECL_SOURCE_LINE (IDENTIFIER_IMPLICIT_DECL (name)),
+	     DECL_SOURCE_LINECOL (IDENTIFIER_IMPLICIT_DECL (name)),
 	     "previous declaration of `%s'",
 	     IDENTIFIER_POINTER (name));
 	  TREE_THIS_VOLATILE (name) = 1;
@@ -2769,7 +2769,7 @@ lookup_label (id)
 
   /* Say where one reference is to the label,
      for the sake of the error if it is not defined.  */
-  DECL_SOURCE_LINE (decl) = lineno;
+  DECL_SOURCE_LINECOL (decl) = linecolno;
   DECL_SOURCE_FILE (decl) = input_filename;
 
   IDENTIFIER_LABEL_VALUE (id) = decl;
@@ -2822,9 +2822,9 @@ shadow_label (name)
    Otherwise return 0.  */
 
 tree
-define_label (filename, line, name)
+define_label (filename, linecolno, name)
      char *filename;
-     int line;
+     linecol linecolno;
      tree name;
 {
   tree decl = lookup_label (name);
@@ -2848,7 +2848,7 @@ define_label (filename, line, name)
       DECL_INITIAL (decl) = error_mark_node;
       /* Say where in the source.  */
       DECL_SOURCE_FILE (decl) = filename;
-      DECL_SOURCE_LINE (decl) = line;
+      DECL_SOURCE_LINECOL (decl) = linecolno;
       return decl;
     }
 }
@@ -2923,7 +2923,7 @@ lookup_tag (code, name, binding_level, t
 		  /* Definition isn't the kind we were looking for.  */
 		  pending_invalid_xref = name;
 		  pending_invalid_xref_file = input_filename;
-		  pending_invalid_xref_line = lineno;
+		  pending_invalid_xref_linecol = linecolno;
 		}
 	      return TREE_VALUE (tail);
 	    }
@@ -2944,7 +2944,7 @@ pending_xref_error ()
 {
   if (pending_invalid_xref != 0)
     error_with_file_and_line (pending_invalid_xref_file,
-			      pending_invalid_xref_line,
+			      pending_invalid_xref_linecol,
 			      "`%s' defined as wrong kind of tag",
 			      IDENTIFIER_POINTER (pending_invalid_xref));
   pending_invalid_xref = 0;
@@ -5769,9 +5769,9 @@ start_struct (code, name)
    are ultimately passed to `build_struct' to make the RECORD_TYPE node.  */
 
 tree
-grokfield (filename, line, declarator, declspecs, width)
+grokfield (filename, linecolno, declarator, declspecs, width)
      const char *filename ATTRIBUTE_UNUSED;
-     int line ATTRIBUTE_UNUSED;
+     linecol linecolno ATTRIBUTE_UNUSED;
      tree declarator, declspecs, width;
 {
   tree value;
@@ -6468,7 +6468,7 @@ start_function (declspecs, declarator, p
     {
       TREE_TYPE (decl1) = TREE_TYPE (old_decl);
       current_function_prototype_file = DECL_SOURCE_FILE (old_decl);
-      current_function_prototype_line = DECL_SOURCE_LINE (old_decl);
+      current_function_prototype_linecol = DECL_SOURCE_LINECOL (old_decl);
     }
 
   /* If there is no explicit declaration, look for any out-of-scope implicit
@@ -6834,7 +6834,7 @@ store_parm_decls ()
 	      found = build_decl (PARM_DECL, TREE_VALUE (parm),
 				  integer_type_node);
 	      DECL_ARG_TYPE (found) = TREE_TYPE (found);
-	      DECL_SOURCE_LINE (found) = DECL_SOURCE_LINE (fndecl);
+	      DECL_SOURCE_LINECOL (found) = DECL_SOURCE_LINECOL (fndecl);
 	      DECL_SOURCE_FILE (found) = DECL_SOURCE_FILE (fndecl);
 	      if (extra_warnings)
 		warning_with_decl (found, "type of `%s' defaults to `int'");
@@ -6924,7 +6924,7 @@ store_parm_decls ()
 		{
 		  error ("number of arguments doesn't match prototype");
 		  error_with_file_and_line (current_function_prototype_file,
-					    current_function_prototype_line,
+					    current_function_prototype_linecol,
 					    "prototype declaration");
 		  break;
 		}
@@ -6954,7 +6954,7 @@ store_parm_decls ()
 				   IDENTIFIER_POINTER (DECL_NAME (parm)));
 			  warning_with_file_and_line
 			    (current_function_prototype_file,
-			     current_function_prototype_line,
+			     current_function_prototype_linecol,
 			     "prototype declaration");
 			}
 		    }
@@ -6967,7 +6967,7 @@ store_parm_decls ()
 		      error ("argument `%s' doesn't match prototype",
 			     IDENTIFIER_POINTER (DECL_NAME (parm)));
 		      error_with_file_and_line (current_function_prototype_file,
-						current_function_prototype_line,
+						current_function_prototype_linecol,
 						"prototype declaration");
 		    }
 		}
@@ -7037,7 +7037,7 @@ store_parm_decls ()
 
   /* Initialize the RTL code for the function.  */
 
-  init_function_start (fndecl, input_filename, lineno);
+  init_function_start (fndecl, input_filename, linecolno);
 
   /* If this is a varargs function, inform function.c.  */
 
@@ -7134,7 +7134,7 @@ combine_parm_decls (specparms, parmlist,
 	  found = build_decl (PARM_DECL, TREE_VALUE (parm),
 			      integer_type_node);
 	  DECL_ARG_TYPE (found) = TREE_TYPE (found);
-	  DECL_SOURCE_LINE (found) = DECL_SOURCE_LINE (fndecl);
+	  DECL_SOURCE_LINECOL (found) = DECL_SOURCE_LINECOL (fndecl);
 	  DECL_SOURCE_FILE (found) = DECL_SOURCE_FILE (fndecl);
 	  error_with_decl (found, "type of parameter `%s' is not declared");
 	  pushdecl (found);
@@ -7263,7 +7263,7 @@ finish_function (nested)
     }
 
   /* Generate rtl for function exit.  */
-  expand_function_end (input_filename, lineno, 0);
+  expand_function_end (input_filename, linecolno, 0);
 
   /* So we can tell if jump_optimize sets it to 1.  */
   can_reach_end = 0;
Index: c-lex.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/c-lex.c,v
retrieving revision 1.49
diff -u -p -r1.49 c-lex.c
--- c-lex.c	1999/03/20 19:21:23	1.49
+++ c-lex.c	1999/03/30 01:33:28
@@ -234,7 +234,8 @@ init_lex ()
 
   /* Start it at 0, because check_newline is called at the very beginning
      and will increment it to 1.  */
-  lineno = 0;
+  linecolno.line = 0;
+  linecolno.column = 0;  /* Unknown column number. */
 
 #ifdef MULTIBYTE_CHARS
   /* Change to the native locale for multibyte conversions.  */
@@ -415,7 +416,7 @@ skip_white_space (c)
 	case '\\':
 	  c = GETC();
 	  if (c == '\n')
-	    lineno++;
+	    linecolno.line++;
 	  else
 	    error ("stray '\\' in program");
 	  c = GETC();
@@ -521,7 +522,8 @@ check_newline ()
   register int c;
   register int token;
 
-  lineno++;
+  linecolno.line++;
+  linecolno.column = 0;  /* We don't update column. */
 
   /* Read first nonwhite char on the line.  */
 
@@ -615,7 +617,7 @@ check_newline ()
 	      && ((c = GETC()) == ' ' || c == '\t' || c == '\n'))
 	    {
 	      if (c != '\n')
-		debug_define (lineno, GET_DIRECTIVE_LINE ());
+		debug_define (linecolno.line, GET_DIRECTIVE_LINE ());
 	      goto skipline;
 	    }
 	}
@@ -628,7 +630,7 @@ check_newline ()
 	      && ((c = GETC()) == ' ' || c == '\t' || c == '\n'))
 	    {
 	      if (c != '\n')
-		debug_undef (lineno, GET_DIRECTIVE_LINE ());
+		debug_undef (linecolno.line, GET_DIRECTIVE_LINE ());
 	      goto skipline;
 	    }
 	}
@@ -707,7 +709,7 @@ linenum:
   if (token == CONSTANT
       && TREE_CODE (yylval.ttype) == INTEGER_CST)
     {
-      int old_lineno = lineno;
+      linecol old_linecolno = linecolno;
       int used_up = 0;
       /* subtract one, because it is the following line that
 	 gets the specified number */
@@ -719,7 +721,7 @@ linenum:
       if (c == '\n')
 	{
 	  /* No more: store the line number and check following line.  */
-	  lineno = l;
+	  linecolno.line = l;
 	  return c;
 	}
       UNGETC (c);
@@ -738,7 +740,7 @@ linenum:
       input_filename
 	= (char *) permalloc (TREE_STRING_LENGTH (yylval.ttype) + 1);
       strcpy (input_filename, TREE_STRING_POINTER (yylval.ttype));
-      lineno = l;
+      linecolno.line = l;
 
       /* Each change of file name
 	 reinitializes whether we are now in a system header.  */
@@ -773,7 +775,7 @@ linenum:
 	      /* Pushing to a new file.  */
 	      struct file_stack *p
 		= (struct file_stack *) xmalloc (sizeof (struct file_stack));
-	      input_file_stack->line = old_lineno;
+	      input_file_stack->line = old_linecolno.line;
 	      p->next = input_file_stack;
 	      p->name = input_filename;
 	      p->indent_level = indent_level;
@@ -791,7 +793,7 @@ linenum:
 		  if (indent_level != p->indent_level)
 		    {
 		      warning_with_file_and_line
-			(p->name, old_lineno,
+			(p->name, old_linecolno,
 			 "This file contains more `%c's than `%c's.",
 			 indent_level > p->indent_level ? '{' : '}',
 			 indent_level > p->indent_level ? '}' : '{');
@@ -987,7 +989,7 @@ readescape (ignore_ptr)
       return c;
 
     case '\n':
-      lineno++;
+      linecolno.line++;
       *ignore_ptr = 1;
       return 0;
 
@@ -1248,7 +1250,7 @@ yylex ()
   token_buffer[0] = c;
   token_buffer[1] = 0;
 
-/*  yylloc.first_line = lineno; */
+/*  yylloc.first_line = linecolno.line; */
 
   switch (c)
     {
@@ -1924,7 +1926,7 @@ yylex ()
 	      {
 		if (pedantic)
 		  pedwarn ("ANSI C forbids newline in character constant");
-		lineno++;
+		linecolno.line++;
 	      }
 	    else
 	      {
@@ -2075,7 +2077,7 @@ yylex ()
 	      {
 		if (pedantic)
 		  pedwarn ("ANSI C forbids newline in string constant");
-		lineno++;
+		linecolno.line++;
 	      }
 	    else
 	      {
@@ -2329,7 +2331,7 @@ yylex ()
     }
 
 done:
-/*  yylloc.last_line = lineno; */
+/*  yylloc.last_line = linecolno.line; */
 
   return value;
 }
Index: c-parse.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/c-parse.h,v
retrieving revision 1.3
diff -u -p -r1.3 c-parse.h
--- c-parse.h	1998/12/16 20:53:50	1.3
+++ c-parse.h	1999/03/30 01:33:29
@@ -1,5 +1,5 @@
 typedef union {long itype; tree ttype; enum tree_code code;
-	char *filename; int lineno; int ends_in_label; } YYSTYPE;
+	char *filename; linecol linecolno; int ends_in_label; } YYSTYPE;
 #define	IDENTIFIER	258
 #define	TYPENAME	259
 #define	SCSPEC	260
Index: c-parse.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/c-parse.in,v
retrieving revision 1.14
diff -u -p -r1.14 c-parse.in
--- c-parse.in	1999/01/06 19:47:24	1.14
+++ c-parse.in	1999/03/30 01:33:29
@@ -97,7 +97,7 @@ end ifc
 %start program
 
 %union {long itype; tree ttype; enum tree_code code;
-	char *filename; int lineno; int ends_in_label; }
+	char *filename; linecol linecolno; int ends_in_label; }
 
 /* All identifiers that are not reserved words
    and are not declared typedefs in the current block */
@@ -210,7 +210,7 @@ end ifc
 %type <ends_in_label> lineno_stmt_or_label lineno_stmt_or_labels stmt_or_label
 
 %type <filename> save_filename
-%type <lineno> save_lineno
+%type <linecolno> save_lineno
 
 ifobjc
 /* the Objective-C nonterminals */
@@ -235,7 +235,7 @@ static int compstmt_count;
 /* Input file and line number of the end of the body of last simple_if;
    used by the stmt-rule immediately after simple_if returns.  */
 static char *if_stmt_file;
-static int if_stmt_line;
+static linecol if_stmt_line;
 
 /* List of types and structure classes of the current declaration.  */
 static tree current_declspecs = NULL_TREE;
@@ -1730,7 +1730,7 @@ errstmt:  error ';'
 	;
 
 pushlevel:  /* empty */
-		{ emit_line_note (input_filename, lineno);
+		{ emit_line_note (input_filename, linecolno);
 		  pushlevel (0);
 		  clear_last_expr ();
 		  push_momentary ();
@@ -1781,7 +1781,7 @@ compstmt_start: '{' { compstmt_count++; 
 compstmt: compstmt_start '}'
 		{ $$ = convert (void_type_node, integer_zero_node); }
 	| compstmt_start pushlevel maybe_label_decls decls xstmts '}'
-		{ emit_line_note (input_filename, lineno);
+		{ emit_line_note (input_filename, linecolno);
 		  expand_end_bindings (getdecls (), 1, 0);
 		  $$ = poplevel (1, 1, 0);
 		  if (yychar == CONSTANT || yychar == STRING)
@@ -1789,7 +1789,7 @@ compstmt: compstmt_start '}'
 		  else
 		    pop_momentary (); }
 	| compstmt_start pushlevel maybe_label_decls error '}'
-		{ emit_line_note (input_filename, lineno);
+		{ emit_line_note (input_filename, linecolno);
 		  expand_end_bindings (getdecls (), kept_level_p (), 0);
 		  $$ = poplevel (kept_level_p (), 0, 0);
 		  if (yychar == CONSTANT || yychar == STRING)
@@ -1797,7 +1797,7 @@ compstmt: compstmt_start '}'
 		  else
 		    pop_momentary (); }
 	| compstmt_start pushlevel maybe_label_decls stmts '}'
-		{ emit_line_note (input_filename, lineno);
+		{ emit_line_note (input_filename, linecolno);
 		  expand_end_bindings (getdecls (), kept_level_p (), 0);
 		  $$ = poplevel (kept_level_p (), 0, 0);
 		  if (yychar == CONSTANT || yychar == STRING)
@@ -1817,12 +1817,12 @@ simple_if:
 
 if_prefix:
 	  IF '(' expr ')'
-		{ emit_line_note ($<filename>-1, $<lineno>0);
+		{ emit_line_note ($<filename>-1, $<linecolno>0);
 		  c_expand_start_cond (truthvalue_conversion ($3), 0, 
 				       compstmt_count);
 		  $<itype>$ = stmt_count;
 		  if_stmt_file = $<filename>-1;
-		  if_stmt_line = $<lineno>0;
+		  if_stmt_line = $<linecolno>0;
 		  position_after_white_space (); }
 	;
 
@@ -1833,7 +1833,7 @@ do_stmt_start:
 	  DO
 		{ stmt_count++;
 		  compstmt_count++;
-		  emit_line_note ($<filename>-1, $<lineno>0);
+		  emit_line_note ($<filename>-1, $<linecolno>0);
 		  /* See comment in `while' alternative, above.  */
 		  emit_nop ();
 		  expand_start_loop_continue_elsewhere (1);
@@ -1847,7 +1847,7 @@ save_filename:
 	;
 
 save_lineno:
-		{ $$ = lineno; }
+		{ $$ = linecolno; }
 	;
 
 lineno_labeled_stmt:
@@ -1879,7 +1879,7 @@ stmt:
         | all_iter_stmt 
 	| expr ';'
 		{ stmt_count++;
-		  emit_line_note ($<filename>-1, $<lineno>0);
+		  emit_line_note ($<filename>-1, $<linecolno>0);
 /* It appears that this should not be done--that a non-lvalue array
    shouldn't get an error if the value isn't used.
    Section 3.2.2.1 says that an array lvalue gets converted to a pointer
@@ -1918,7 +1918,7 @@ stmt:
 		{ c_expand_end_cond (); }
 	| WHILE
 		{ stmt_count++;
-		  emit_line_note ($<filename>-1, $<lineno>0);
+		  emit_line_note ($<filename>-1, $<linecolno>0);
 		  /* The emit_nop used to come before emit_line_note,
 		     but that made the nop seem like part of the preceding line.
 		     And that was confusing when the preceding line was
@@ -1931,7 +1931,7 @@ stmt:
 		     in parsing the end test.  This is to make sure
 		     that we end every loop we start.  */
 		  expand_start_loop (1);
-		  emit_line_note (input_filename, lineno);
+		  emit_line_note (input_filename, linecolno);
 		  expand_exit_loop_if_false (NULL_PTR,
 					     truthvalue_conversion ($4));
 		  position_after_white_space (); }
@@ -1939,7 +1939,7 @@ stmt:
 		{ expand_end_loop (); }
 	| do_stmt_start
 	  '(' expr ')' ';'
-		{ emit_line_note (input_filename, lineno);
+		{ emit_line_note (input_filename, linecolno);
 		  expand_exit_loop_if_false (NULL_PTR,
 					     truthvalue_conversion ($3));
 		  expand_end_loop ();
@@ -1951,7 +1951,7 @@ stmt:
 	| FOR
 	  '(' xexpr ';'
 		{ stmt_count++;
-		  emit_line_note ($<filename>-1, $<lineno>0);
+		  emit_line_note ($<filename>-1, $<linecolno>0);
 		  /* See comment in `while' alternative, above.  */
 		  emit_nop ();
 		  if ($3) c_expand_expr_stmt ($3);
@@ -1962,7 +1962,7 @@ stmt:
 		}
 	  xexpr ';'
 		/* Can't emit now; wait till after expand_start_loop...  */
-		{ $<lineno>7 = lineno;
+		{ $<linecolno>7 = linecolno;
 		  $<filename>$ = input_filename; }
 	  xexpr ')'
 		{ 
@@ -1970,19 +1970,19 @@ stmt:
 		     all the expressions ensures we will end the loop.  */
 		  expand_start_loop_continue_elsewhere (1);
 		  /* Emit the end-test, with a line number.  */
-		  emit_line_note ($<filename>8, $<lineno>7);
+		  emit_line_note ($<filename>8, $<linecolno>7);
 		  if ($6)
 		    expand_exit_loop_if_false (NULL_PTR,
 					       truthvalue_conversion ($6));
 		  /* Don't let the tree nodes for $9 be discarded by
 		     clear_momentary during the parsing of the next stmt.  */
 		  push_momentary ();
-		  $<lineno>7 = lineno;
+		  $<linecolno>7 = linecolno;
 		  $<filename>8 = input_filename;
 		  position_after_white_space (); }
 	  lineno_labeled_stmt
 		{ /* Emit the increment expression, with a line number.  */
-		  emit_line_note ($<filename>8, $<lineno>7);
+		  emit_line_note ($<filename>8, $<linecolno>7);
 		  expand_loop_continue_here ();
 		  if ($9)
 		    c_expand_expr_stmt ($9);
@@ -1993,7 +1993,7 @@ stmt:
 		  expand_end_loop (); }
 	| SWITCH '(' expr ')'
 		{ stmt_count++;
-		  emit_line_note ($<filename>-1, $<lineno>0);
+		  emit_line_note ($<filename>-1, $<linecolno>0);
 		  c_expand_start_case ($3);
 		  /* Don't let the tree nodes for $3 be discarded by
 		     clear_momentary during the parsing of the next stmt.  */
@@ -2007,25 +2007,25 @@ stmt:
 		    pop_momentary (); }
 	| BREAK ';'
 		{ stmt_count++;
-		  emit_line_note ($<filename>-1, $<lineno>0);
+		  emit_line_note ($<filename>-1, $<linecolno>0);
 		  if ( ! expand_exit_something ())
 		    error ("break statement not within loop or switch"); }
 	| CONTINUE ';'
 		{ stmt_count++;
-		  emit_line_note ($<filename>-1, $<lineno>0);
+		  emit_line_note ($<filename>-1, $<linecolno>0);
 		  if (! expand_continue_loop (NULL_PTR))
 		    error ("continue statement not within a loop"); }
 	| RETURN ';'
 		{ stmt_count++;
-		  emit_line_note ($<filename>-1, $<lineno>0);
+		  emit_line_note ($<filename>-1, $<linecolno>0);
 		  c_expand_return (NULL_TREE); }
 	| RETURN expr ';'
 		{ stmt_count++;
-		  emit_line_note ($<filename>-1, $<lineno>0);
+		  emit_line_note ($<filename>-1, $<linecolno>0);
 		  c_expand_return ($2); }
 	| ASM_KEYWORD maybe_type_qual '(' expr ')' ';'
 		{ stmt_count++;
-		  emit_line_note ($<filename>-1, $<lineno>0);
+		  emit_line_note ($<filename>-1, $<linecolno>0);
 		  STRIP_NOPS ($4);
 		  if ((TREE_CODE ($4) == ADDR_EXPR
 		       && TREE_CODE (TREE_OPERAND ($4, 0)) == STRING_CST)
@@ -2036,29 +2036,29 @@ stmt:
 	/* This is the case with just output operands.  */
 	| ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ')' ';'
 		{ stmt_count++;
-		  emit_line_note ($<filename>-1, $<lineno>0);
+		  emit_line_note ($<filename>-1, $<linecolno>0);
 		  c_expand_asm_operands ($4, $6, NULL_TREE, NULL_TREE,
 					 $2 == ridpointers[(int)RID_VOLATILE],
-					 input_filename, lineno); }
+					 input_filename, linecolno); }
 	/* This is the case with input operands as well.  */
 	| ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ':' asm_operands ')' ';'
 		{ stmt_count++;
-		  emit_line_note ($<filename>-1, $<lineno>0);
+		  emit_line_note ($<filename>-1, $<linecolno>0);
 		  c_expand_asm_operands ($4, $6, $8, NULL_TREE,
 					 $2 == ridpointers[(int)RID_VOLATILE],
-					 input_filename, lineno); }
+					 input_filename, linecolno); }
 	/* This is the case with clobbered registers as well.  */
 	| ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ':'
   	  asm_operands ':' asm_clobbers ')' ';'
 		{ stmt_count++;
-		  emit_line_note ($<filename>-1, $<lineno>0);
+		  emit_line_note ($<filename>-1, $<linecolno>0);
 		  c_expand_asm_operands ($4, $6, $8, $10,
 					 $2 == ridpointers[(int)RID_VOLATILE],
-					 input_filename, lineno); }
+					 input_filename, linecolno); }
 	| GOTO identifier ';'
 		{ tree decl;
 		  stmt_count++;
-		  emit_line_note ($<filename>-1, $<lineno>0);
+		  emit_line_note ($<filename>-1, $<linecolno>0);
 		  decl = lookup_label ($2);
 		  if (decl != 0)
 		    {
@@ -2070,7 +2070,7 @@ stmt:
 		{ if (pedantic)
 		    pedwarn ("ANSI C forbids `goto *expr;'");
 		  stmt_count++;
-		  emit_line_note ($<filename>-1, $<lineno>0);
+		  emit_line_note ($<filename>-1, $<linecolno>0);
 		  expand_computed_goto (convert (ptr_type_node, $3)); }
 	| ';'
 	;
@@ -2123,7 +2123,7 @@ all_iter_stmt_with_decl:
 	  lineno_labeled_stmt
 	  {
 	    iterator_for_loop_end ($6);
-	    emit_line_note (input_filename, lineno);
+	    emit_line_note (input_filename, linecolno);
 	    expand_end_bindings (getdecls (), 1, 0);
 	    $<ttype>$ = poplevel (1, 1, 0);
 	    if (yychar == CONSTANT || yychar == STRING)
@@ -2215,7 +2215,7 @@ label:	  CASE expr_no_commas ':'
 		    }
 		  position_after_white_space (); }
 	| identifier ':' maybe_attribute
-		{ tree label = define_label (input_filename, lineno, $1);
+		{ tree label = define_label (input_filename, linecolno, $1);
 		  stmt_count++;
 		  emit_nop ();
 		  if (label)
@@ -2230,10 +2230,10 @@ label:	  CASE expr_no_commas ':'
 
 maybe_type_qual:
 	/* empty */
-		{ emit_line_note (input_filename, lineno);
+		{ emit_line_note (input_filename, linecolno);
 		  $$ = NULL_TREE; }
 	| TYPE_QUAL
-		{ emit_line_note (input_filename, lineno); }
+		{ emit_line_note (input_filename, linecolno); }
 	;
 
 xexpr:
Index: c-tree.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/c-tree.h,v
retrieving revision 1.20
diff -u -p -r1.20 c-tree.h
--- c-tree.h	1999/02/18 20:38:43	1.20
+++ c-tree.h	1999/03/30 01:33:29
@@ -296,7 +296,7 @@ extern void clear_parm_order            
 extern tree combine_parm_decls                  PROTO((tree, tree, int));
 extern int  complete_array_type                 PROTO((tree, tree, int));
 extern void declare_parm_level                  PROTO((int));
-extern tree define_label                        PROTO((char *, int, tree));
+extern tree define_label                        PROTO((char *, linecol, tree));
 extern void delete_block                        PROTO((tree));
 extern void finish_decl                         PROTO((tree, tree, tree));
 extern void finish_decl_top_level               PROTO((tree, tree, tree));
@@ -307,7 +307,7 @@ extern tree get_parm_info               
 extern tree getdecls                            PROTO((void));
 extern tree gettags                             PROTO((void));
 extern int  global_bindings_p                   PROTO((void));
-extern tree grokfield                           PROTO((const char *, int, tree, tree, tree));
+extern tree grokfield                           PROTO((const char *, linecol, tree, tree, tree));
 extern tree groktypename                        PROTO((tree));
 extern tree groktypename_in_parm_context        PROTO((tree));
 extern tree implicitly_declare                  PROTO((tree));
@@ -396,7 +396,7 @@ extern void set_init_index			PROTO((tree
 extern void set_init_label			PROTO((tree));
 extern void process_init_element		PROTO((tree));
 extern void c_expand_asm_operands		PROTO((tree, tree, tree, tree,
-						       int, char *, int));
+						       int, char *, linecol));
 extern void c_expand_return			PROTO((tree));
 extern tree c_expand_start_case                 PROTO((tree));
 
Index: c-typeck.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/c-typeck.c,v
retrieving revision 1.25
diff -u -p -r1.25 c-typeck.c
--- c-typeck.c	1999/02/18 20:38:44	1.25
+++ c-typeck.c	1999/03/30 01:33:29
@@ -6740,11 +6740,11 @@ process_init_element (value)
    Arguments are same as for expand_asm_operands.  */
 
 void
-c_expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
+c_expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, linecolno)
      tree string, outputs, inputs, clobbers;
      int vol;
      char *filename;
-     int line;
+     linecol linecolno;
 {
   int noutputs = list_length (outputs);
   register int i;
@@ -6775,7 +6775,7 @@ c_expand_asm_operands (string, outputs, 
   /* Generate the ASM_OPERANDS insn;
      store into the TREE_VALUEs of OUTPUTS some trees for
      where the values were actually stored.  */
-  expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line);
+  expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, linecolno);
 
   /* Copy all the intermediate outputs into the specified outputs.  */
   for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++)
Index: cexp.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cexp.c,v
retrieving revision 1.18
diff -u -p -r1.18 cexp.c
--- cexp.c	1999/03/16 21:10:35	1.18
+++ cexp.c	1999/03/30 01:33:29
@@ -336,7 +336,7 @@ static const short yycheck[] = {     4,
     26,    27,    23,    24,    25,    26,    27,     0,     9
 };
 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
-#line 3 "/tmp/sky/share/bison.simple"
+#line 3 "/usr/cygnus/gnupro-98r2/share/bison.simple"
 
 /* Skeleton output parser for bison,
    Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@@ -529,7 +529,7 @@ __yy_memcpy (char *to, char *from, int c
 #endif
 #endif
 
-#line 196 "/tmp/sky/share/bison.simple"
+#line 196 "/usr/cygnus/gnupro-98r2/share/bison.simple"
 
 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
    into yyparse.  The argument should have type void *.
@@ -1110,7 +1110,7 @@ case 40:
     break;}
 }
    /* the action file gets copied in in place of this dollarsign */
-#line 498 "/tmp/sky/share/bison.simple"
+#line 498 "/usr/cygnus/gnupro-98r2/share/bison.simple"
 
   yyvsp -= yylen;
   yyssp -= yylen;
Index: dbxout.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/dbxout.c,v
retrieving revision 1.34
diff -u -p -r1.34 dbxout.c
--- dbxout.c	1999/03/19 08:50:00	1.34
+++ dbxout.c	1999/03/30 01:33:30
@@ -562,17 +562,17 @@ dbxout_source_file (file, filename)
    for source file FILENAME and line number LINENO.  */
 
 void
-dbxout_source_line (file, filename, lineno)
+dbxout_source_line (file, filename, linecolno)
      FILE *file;
      char *filename;
-     int lineno;
+     linecol linecolno;
 {
   dbxout_source_file (file, filename);
 
 #ifdef ASM_OUTPUT_SOURCE_LINE
-  ASM_OUTPUT_SOURCE_LINE (file, lineno);
+  ASM_OUTPUT_SOURCE_LINE (file, linecolno.line);
 #else
-  fprintf (file, "\t%s %d,0,%d\n", ASM_STABD_OP, N_SLINE, lineno);
+  fprintf (file, "\t%s %d,0,%d\n", ASM_STABD_OP, N_SLINE, linecolno.line);
 #endif
 }
 
Index: dbxout.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/dbxout.h,v
retrieving revision 1.4
diff -u -p -r1.4 dbxout.h
--- dbxout.h	1998/12/16 20:54:52	1.4
+++ dbxout.h	1999/03/30 01:33:30
@@ -29,5 +29,5 @@ extern void dbxout_parms		PROTO ((tree))
 extern void dbxout_reg_parms		PROTO ((tree));
 extern void dbxout_syms			PROTO ((tree));
 extern void dbxout_function		PROTO ((tree));
-extern void dbxout_source_line		PROTO ((FILE *, char*, int));
+extern void dbxout_source_line		PROTO ((FILE *, char*, linecol));
 extern void dbxout_begin_function	PROTO ((tree));
Index: emit-rtl.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/emit-rtl.c,v
retrieving revision 1.54
diff -u -p -r1.54 emit-rtl.c
--- emit-rtl.c	1999/03/25 12:04:24	1.54
+++ emit-rtl.c	1999/03/30 01:33:30
@@ -185,7 +185,7 @@ static int cur_insn_uid = 1;
 /* Line number and source file of the last line-number NOTE emitted.
    This is used to avoid generating duplicates.  */
 
-static int last_linenum = 0;
+static linecol last_linecolno = { 0, 0 };
 static char *last_filename = 0;
 
 /* A vector indexed by pseudo reg number.  The allocated length
@@ -242,7 +242,7 @@ extern int rtx_equal_function_value_matt
 /* Filename and line number of last line-number note,
    whether we actually emitted it or not.  */
 extern char *emit_filename;
-extern int emit_lineno;
+extern linecol emit_linecolno;
 
 static rtx make_jump_insn_raw		PROTO((rtx));
 static rtx make_call_insn_raw		PROTO((rtx));
@@ -1619,7 +1619,7 @@ save_emit_status (p)
   p->sequence_rtl_expr = sequence_rtl_expr;
   p->sequence_stack = sequence_stack;
   p->cur_insn_uid = cur_insn_uid;
-  p->last_linenum = last_linenum;
+  p->last_linecolno = last_linecolno;
   p->last_filename = last_filename;
   p->regno_pointer_flag = regno_pointer_flag;
   p->regno_pointer_align = regno_pointer_align;
@@ -1644,7 +1644,7 @@ restore_emit_status (p)
   sequence_rtl_expr = p->sequence_rtl_expr;
   sequence_stack = p->sequence_stack;
   cur_insn_uid = p->cur_insn_uid;
-  last_linenum = p->last_linenum;
+  last_linecolno = p->last_linecolno;
   last_filename = p->last_filename;
   regno_pointer_flag = p->regno_pointer_flag;
   regno_pointer_align = p->regno_pointer_align;
@@ -3075,24 +3075,24 @@ emit_barrier ()
 }
 
 /* Make an insn of code NOTE
-   with data-fields specified by FILE and LINE
+   with data-fields specified by FILE and POS
    and add it to the end of the doubly-linked list,
    but only if line-numbers are desired for debugging info.  */
 
 rtx
-emit_line_note (file, line)
+emit_line_note (file, pos)
      char *file;
-     int line;
+     linecol pos;
 {
   emit_filename = file;
-  emit_lineno = line;
+  emit_linecolno = pos;
 
 #if 0
   if (no_line_numbers)
     return 0;
 #endif
 
-  return emit_note (file, line);
+  return emit_raw_note (file, pos);
 }
 
 /* Make an insn of code NOTE
@@ -3105,18 +3105,30 @@ emit_note (file, line)
      char *file;
      int line;
 {
+  linecol linecolno;
+  linecolno.line = line;
+  linecolno.column = 0;
+  return emit_raw_note (file, linecolno);
+}
+
+rtx
+emit_raw_note (file, linecolno)
+     char *file;
+     linecol linecolno;
+{
   register rtx note;
 
-  if (line > 0)
+  if (linecolno.line > 0)
     {
       if (file && last_filename && !strcmp (file, last_filename)
-	  && line == last_linenum)
+	  && linecolno.line == last_linecolno.line
+	  && linecolno.column == last_linecolno.column)
 	return 0;
       last_filename = file;
-      last_linenum = line;
+      last_linecolno = linecolno;
     }
 
-  if (no_line_numbers && line > 0)
+  if (no_line_numbers && linecolno.line > 0)
     {
       cur_insn_uid++;
       return 0;
@@ -3125,7 +3137,7 @@ emit_note (file, line)
   note = rtx_alloc (NOTE);
   INSN_UID (note) = cur_insn_uid++;
   NOTE_SOURCE_FILE (note) = file;
-  NOTE_LINE_NUMBER (note) = line;
+  NOTE_LINE_LINECOL (note) = linecolno;
   add_insn (note);
   return note;
 }
@@ -3133,12 +3145,13 @@ emit_note (file, line)
 /* Emit a NOTE, and don't omit it even if LINE is the previous note.  */
 
 rtx
-emit_line_note_force (file, line)
+emit_line_note_force (file, linecolno)
      char *file;
-     int line;
+     linecol linecolno;
 {
-  last_linenum = -1;
-  return emit_line_note (file, line);
+  last_linecolno.line = -1;
+  last_linecolno.column = 0;
+  return emit_line_note (file, linecolno);
 }
 
 /* Cause next statement to emit a line note even if the line number
@@ -3147,7 +3160,8 @@ emit_line_note_force (file, line)
 void
 force_next_line_note ()
 {
-  last_linenum = -1;
+  last_linecolno.line = -1;
+  last_linecolno.column = 0;
 }
 
 /* Place a note of KIND on insn INSN with DATUM as the datum. If a
@@ -3431,7 +3445,8 @@ init_emit ()
   sequence_rtl_expr = NULL;
   cur_insn_uid = 1;
   reg_rtx_no = LAST_VIRTUAL_REGISTER + 1;
-  last_linenum = 0;
+  last_linecolno.line = 0;
+  last_linecolno.column = 0;
   last_filename = 0;
   first_label_num = label_num;
   last_label_num = 0;
Index: except.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/except.c,v
retrieving revision 1.80
diff -u -p -r1.80 except.c
--- except.c	1999/03/29 15:07:37	1.80
+++ except.c	1999/03/30 01:33:30
@@ -1819,7 +1819,7 @@ expand_start_all_catch ()
   /* End the try block.  */
   expand_eh_region_end (integer_zero_node);
 
-  emit_line_note (input_filename, lineno);
+  emit_line_note (input_filename, linecolno);
   label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
 
   /* The label for the exception handling block that we will save.
Index: expr.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/expr.c,v
retrieving revision 1.132
diff -u -p -r1.132 expr.c
--- expr.c	1999/03/23 22:33:35	1.132
+++ expr.c	1999/03/30 01:33:31
@@ -5835,15 +5835,15 @@ expand_expr (exp, target, tmode, modifie
       {
 	rtx to_return;
 	char *saved_input_filename = input_filename;
-	int saved_lineno = lineno;
+	linecol saved_linecolno = linecolno;
 	input_filename = EXPR_WFL_FILENAME (exp);
-	lineno = EXPR_WFL_LINENO (exp);
+	linecolno = EXPR_WFL_LINECOL (exp);
 	if (EXPR_WFL_EMIT_LINE_NOTE (exp))
-	  emit_line_note (input_filename, lineno);
+	  emit_line_note (input_filename, linecolno);
 	/* Possibly avoid switching back and force here */
 	to_return = expand_expr (EXPR_WFL_NODE (exp), target, tmode, modifier);
 	input_filename = saved_input_filename;
-	lineno = saved_lineno;
+	linecolno = saved_linecolno;
 	return to_return;
       }
 
Index: final.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/final.c,v
retrieving revision 1.75
diff -u -p -r1.75 final.c
--- final.c	1999/03/22 07:56:06	1.75
+++ final.c	1999/03/30 01:33:31
@@ -3006,7 +3006,7 @@ output_source_line (file, insn)
 
 #if defined (DBX_DEBUGGING_INFO)
       if (write_symbols == DBX_DEBUG)
-	dbxout_source_line (file, filename, NOTE_LINE_NUMBER (insn));
+	dbxout_source_line (file, filename, NOTE_LINE_LINECOL (insn));
 #endif
 
 #if defined (XCOFF_DEBUGGING_INFO)
Index: function.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/function.c,v
retrieving revision 1.84
diff -u -p -r1.84 function.c
--- function.c	1999/03/27 23:08:37	1.84
+++ function.c	1999/03/30 01:33:31
@@ -5837,10 +5837,10 @@ all_blocks (block, vector)
    of the function.  */
 
 void
-init_function_start (subr, filename, line)
+init_function_start (subr, filename, linecolno)
      tree subr;
      char *filename;
-     int line;
+     linecol linecolno;
 {
   init_stmt_for_function ();
 
@@ -5941,8 +5941,8 @@ init_function_start (subr, filename, lin
   /* Prevent ever trying to delete the first instruction of a function.
      Also tell final how to output a linenum before the function prologue.
      Note linenums could be missing, e.g. when compiling a Java .class file. */
-  if (line > 0)
-    emit_line_note (filename, line);
+  if (linecolno.line > 0)
+    emit_line_note (filename, linecolno);
 
   /* Make sure first insn is a note even if we don't want linenums.
      This makes sure the first insn will never be deleted.
@@ -6273,9 +6273,9 @@ expand_function_start (subr, parms_have_
    or else, supply 1 for END_BINDINGS and we will call expand_end_bindings.  */
 
 void
-expand_function_end (filename, line, end_bindings)
+expand_function_end (filename, linecolno, end_bindings)
      char *filename;
-     int line;
+     linecol linecolno;
      int end_bindings;
 {
   register int i;
@@ -6435,7 +6435,7 @@ expand_function_end (filename, line, end
 
   /* Output a linenumber for the end of the function.
      SDB depends on this.  */
-  emit_line_note_force (filename, line);
+  emit_line_note_force (filename, linecolno);
 
   /* Output the label for the actual return from the function,
      if one is expected.  This happens either because a function epilogue
Index: function.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/function.h,v
retrieving revision 1.18
diff -u -p -r1.18 function.h
--- function.h	1999/02/25 23:45:18	1.18
+++ function.h	1999/03/30 01:33:31
@@ -134,7 +134,7 @@ struct function
   rtx last_expr_value;
   int expr_stmts_for_value;
   char *emit_filename;
-  int emit_lineno;
+  linecol emit_linecolno;
   struct goto_fixup *goto_fixup_chain;
 
   /* For exception handling information.  */
@@ -164,7 +164,7 @@ struct function
   tree sequence_rtl_expr;
   struct sequence_stack *sequence_stack;
   int cur_insn_uid;
-  int last_linenum;
+  linecol last_linecolno;
   char *last_filename;
   char *regno_pointer_flag;
   char *regno_pointer_align;
Index: gengenrtl.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/gengenrtl.c,v
retrieving revision 1.19
diff -u -p -r1.19 gengenrtl.c
--- gengenrtl.c	1999/01/06 20:44:31	1.19
+++ gengenrtl.c	1999/03/30 01:33:31
@@ -79,6 +79,8 @@ type_from_format (c)
       return "void *";
     case 't':
       return "void *";
+    case 'L':
+      return "linecol";
     default:
       abort ();
     }
@@ -105,6 +107,8 @@ accessor_from_format (c)
       return "XBITMAP";
     case 't':
       return "XTREE";
+    case 'L':
+      return "XLINECOL";
     default:
       abort ();
     }
Index: integrate.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/integrate.c,v
retrieving revision 1.51
diff -u -p -r1.51 integrate.c
--- integrate.c	1999/03/06 05:34:14	1.51
+++ integrate.c	1999/03/30 01:33:31
@@ -1592,8 +1592,8 @@ expand_inline_function (fndecl, parms, t
   if (GET_CODE (parm_insns) == NOTE
       && NOTE_LINE_NUMBER (parm_insns) > 0)
     {
-      rtx note = emit_note (NOTE_SOURCE_FILE (parm_insns),
-			    NOTE_LINE_NUMBER (parm_insns));
+      rtx note = emit_raw_note (NOTE_SOURCE_FILE (parm_insns),
+				NOTE_LINE_LINECOL (parm_insns));
       if (note)
 	RTX_INTEGRATED_P (note) = 1;
     }
@@ -1673,8 +1673,8 @@ expand_inline_function (fndecl, parms, t
 	  && ! (GET_CODE (XEXP (loc, 0)) == REG
 		&& REGNO (XEXP (loc, 0)) > LAST_VIRTUAL_REGISTER))
 	{
-	  rtx note = emit_note (DECL_SOURCE_FILE (formal),
-				DECL_SOURCE_LINE (formal));
+	  rtx note = emit_raw_note (DECL_SOURCE_FILE (formal),
+				    DECL_SOURCE_LINECOL (formal));
 	  if (note)
 	    RTX_INTEGRATED_P (note) = 1;
 
@@ -2054,8 +2054,8 @@ expand_inline_function (fndecl, parms, t
 	      && NOTE_LINE_NUMBER (insn) != NOTE_INSN_FUNCTION_BEG
 	      && NOTE_LINE_NUMBER (insn) != NOTE_INSN_DELETED)
 	    {
-	      copy = emit_note (NOTE_SOURCE_FILE (insn),
-				NOTE_LINE_NUMBER (insn));
+	      copy = emit_raw_note (NOTE_SOURCE_FILE (insn),
+				    NOTE_LINE_LINECOL (insn));
 	      if (copy
 		  && (NOTE_LINE_NUMBER (copy) == NOTE_INSN_EH_REGION_BEG
 		      || NOTE_LINE_NUMBER (copy) == NOTE_INSN_EH_REGION_END))
@@ -2146,7 +2146,7 @@ expand_inline_function (fndecl, parms, t
   if (flag_test_coverage)
     emit_note (0, NOTE_REPEATED_LINE_NUMBER);
 
-  emit_line_note (input_filename, lineno);
+  emit_line_note (input_filename, linecolno);
 
   /* If the function returns a BLKmode object in a register, copy it
      out of the temp register into a BLKmode memory object. */
@@ -3362,7 +3362,7 @@ output_inline_function (fndecl)
   current_function_decl = fndecl;
 
   /* This call is only used to initialize global variables.  */
-  init_function_start (fndecl, "lossage", 1);
+  init_function_start (fndecl, "lossage", unknown_linecol);
 
   /* Redo parameter determinations in case the FUNCTION_...
      macros took machine-specific actions that need to be redone.  */
Index: profile.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/profile.c,v
retrieving revision 1.27
diff -u -p -r1.27 profile.c
--- profile.c	1999/01/27 01:42:35	1.27
+++ profile.c	1999/03/30 01:33:32
@@ -1676,7 +1676,7 @@ output_func_start_profiler ()
   temporary_allocation ();
   pushlevel (0);
   make_function_rtl (fndecl);
-  init_function_start (fndecl, input_filename, lineno);
+  init_function_start (fndecl, input_filename, linecolno);
   expand_function_start (fndecl, 0);
 
   /* Actually generate the code to call __bb_init_func. */
@@ -1686,7 +1686,7 @@ output_func_start_profiler ()
   emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__bb_init_func"), 0,
 		     mode, 1, table_address, Pmode);
 
-  expand_function_end (input_filename, lineno, 0);
+  expand_function_end (input_filename, linecolno, 0);
   poplevel (1, 0, 1);
 
   /* Since fndecl isn't in the list of globals, it would never be emitted
Index: reload1.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/reload1.c,v
retrieving revision 1.142
diff -u -p -r1.142 reload1.c
--- reload1.c	1999/03/28 14:33:50	1.142
+++ reload1.c	1999/03/30 01:33:32
@@ -3109,7 +3109,7 @@ eliminate_regs (x, mem_mode, insn)
 				    new_asm_operands_vec,
 				    ASM_OPERANDS_INPUT_CONSTRAINT_VEC (x),
 				    ASM_OPERANDS_SOURCE_FILE (x),
-				    ASM_OPERANDS_SOURCE_LINE (x));
+				    ASM_OPERANDS_SOURCE_LINECOL (x));
 	new->volatil = x->volatil;
 	return new;
       }
Index: rtl.def
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/rtl.def,v
retrieving revision 1.17
diff -u -p -r1.17 rtl.def
--- rtl.def	1999/01/24 07:13:55	1.17
+++ rtl.def	1999/03/30 01:33:32
@@ -425,7 +425,7 @@ DEF_RTL_EXPR(ASM_INPUT, "asm_input", "s"
      and whose mode indicates the mode of the input operand.
    6th is the name of the containing source file.
    7th is the source line number.  */
-DEF_RTL_EXPR(ASM_OPERANDS, "asm_operands", "ssiEEsi", 'x')
+DEF_RTL_EXPR(ASM_OPERANDS, "asm_operands", "ssiEEsL", 'x')
 
 /* A machine-specific operation.
    1st operand is a vector of operands being used by the operation so that
Index: stmt.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/stmt.c,v
retrieving revision 1.68
diff -u -p -r1.68 stmt.c
--- stmt.c	1999/03/06 05:34:15	1.68
+++ stmt.c	1999/03/30 01:33:33
@@ -65,7 +65,7 @@ struct obstack stmt_obstack;
 /* Filename and line number of last line-number note,
    whether we actually emitted it or not.  */
 char *emit_filename;
-int emit_lineno;
+linecol emit_linecolno;
 
 /* Nonzero if within a ({...}) grouping, in which case we must
    always compute a value for each expr-stmt in case it is the last one.  */
@@ -504,7 +504,7 @@ save_stmt_status (p)
   p->last_expr_value = last_expr_value;
   p->expr_stmts_for_value = expr_stmts_for_value;
   p->emit_filename = emit_filename;
-  p->emit_lineno = emit_lineno;
+  p->emit_linecolno = emit_linecolno;
   p->goto_fixup_chain = goto_fixup_chain;
   save_eh_status (p);
 }
@@ -525,7 +525,7 @@ restore_stmt_status (p)
   last_expr_value = p->last_expr_value;
   expr_stmts_for_value = p->expr_stmts_for_value;
   emit_filename = p->emit_filename;
-  emit_lineno = p->emit_lineno;
+  emit_linecolno = p->emit_linecolno;
   goto_fixup_chain = p->goto_fixup_chain;
   restore_eh_status (p);
 }
@@ -1166,11 +1166,11 @@ expand_asm (body)
    VOL nonzero means the insn is volatile; don't optimize it.  */
 
 void
-expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
+expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, linecolno)
      tree string, outputs, inputs, clobbers;
      int vol;
      char *filename;
-     int line;
+     linecol linecolno;
 {
   rtvec argvec, constraints;
   rtx body;
@@ -1408,7 +1408,7 @@ expand_asm_operands (string, outputs, in
 
   body = gen_rtx_ASM_OPERANDS (VOIDmode,
 			       TREE_STRING_POINTER (string), "", 0, argvec,
-			       constraints, filename, line);
+			       constraints, filename, linecolno);
 
   MEM_VOLATILE_P (body) = vol;
 
@@ -1619,7 +1619,7 @@ expand_asm_operands (string, outputs, in
 						 TREE_STRING_POINTER (string),
 						 TREE_STRING_POINTER (TREE_PURPOSE (tail)),
 						 i, argvec, constraints,
-						 filename, line));
+						 filename, linecolno));
 	  MEM_VOLATILE_P (SET_SRC (XVECEXP (body, 0, i))) = vol;
 	}
 
@@ -1680,7 +1680,7 @@ expand_expr_stmt (exp)
       if (! TREE_SIDE_EFFECTS (exp) && (extra_warnings || warn_unused)
 	  && !(TREE_CODE (exp) == CONVERT_EXPR
 	       && TREE_TYPE (exp) == void_type_node))
-	warning_with_file_and_line (emit_filename, emit_lineno,
+	warning_with_file_and_line (emit_filename, emit_linecolno,
 				    "statement with no effect");
       else if (warn_unused)
 	warn_if_unused_value (exp);
@@ -1824,7 +1824,7 @@ warn_if_unused_value (exp)
 	  && TREE_THIS_VOLATILE (exp))
 	return 0;
     warn:
-      warning_with_file_and_line (emit_filename, emit_lineno,
+      warning_with_file_and_line (emit_filename, emit_linecolno,
 				  "value computed is not used");
       return 1;
     }
@@ -3715,7 +3715,7 @@ expand_decl_init (decl)
     }
   else if (DECL_INITIAL (decl) && TREE_CODE (DECL_INITIAL (decl)) != TREE_LIST)
     {
-      emit_line_note (DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
+      emit_line_note (DECL_SOURCE_FILE (decl), DECL_SOURCE_LINECOL (decl));
       expand_assignment (decl, DECL_INITIAL (decl), 0, 0);
       emit_queue ();
     }
@@ -4279,7 +4279,7 @@ check_seenlabel ()
 	      /* If insn is zero, then there must have been a syntax error.  */
 	      if (insn)
 		warning_with_file_and_line (NOTE_SOURCE_FILE(insn),
-					    NOTE_LINE_NUMBER(insn),
+					    NOTE_LINE_LINECOL(insn),
 					    "unreachable code at beginning of %s",
 					    case_stack->data.case_stmt.printname);
 	      break;
Index: toplev.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/toplev.c,v
retrieving revision 1.166
diff -u -p -r1.166 toplev.c
--- toplev.c	1999/03/22 23:23:26	1.166
+++ toplev.c	1999/03/30 01:33:33
@@ -165,42 +165,42 @@ extern void print_rtl_with_bb ();
 
 void rest_of_decl_compilation ();
 void error_with_file_and_line PVPROTO((const char *file,
-				       int line, const char *s, ...));
+				       linecol line, const char *s, ...));
 void error_with_decl PVPROTO((tree decl, const char *s, ...));
 void error_for_asm PVPROTO((rtx insn, const char *s, ...));
 void notice PVPROTO((const char *s, ...));
 void error PVPROTO((const char *s, ...));
 void fatal PVPROTO((const char *s, ...));
 void warning_with_file_and_line PVPROTO((const char *file,
-					 int line, const char *s, ...));
+					 linecol pos, const char *s, ...));
 void warning_with_decl PVPROTO((tree decl, const char *s, ...));
 void warning PVPROTO((const char *s, ...));
 void pedwarn PVPROTO((const char *s, ...));
 void pedwarn_with_decl PVPROTO((tree decl, const char *s, ...));
 void pedwarn_with_file_and_line PVPROTO((const char *file,
-					 int line, const char *s, ...));
+					 linecol pos, const char *s, ...));
 void sorry PVPROTO((const char *s, ...));
 static void set_target_switch PROTO((const char *));
 static char *decl_name PROTO((tree, int));
 static void vmessage PROTO((const char *, const char *, va_list));
-static void v_message_with_file_and_line PROTO((const char *, int, int,
+static void v_message_with_file_and_line PROTO((const char *, linecol, int,
 						const char *, va_list));
 static void v_message_with_decl PROTO((tree, int, const char *, va_list));
-static void file_and_line_for_asm PROTO((rtx, char **, int *));
-static void v_error_with_file_and_line PROTO((const char *, int,
+static void file_and_line_for_asm PROTO((rtx, char **, linecol *));
+static void v_error_with_file_and_line PROTO((const char *, linecol,
 					      const char *, va_list));
 static void v_error_with_decl PROTO((tree, const char *, va_list));
 static void v_error_for_asm PROTO((rtx, const char *, va_list));
 static void verror PROTO((const char *, va_list));
 static void vfatal PROTO((const char *, va_list)) ATTRIBUTE_NORETURN;
-static void v_warning_with_file_and_line PROTO ((const char *, int,
+static void v_warning_with_file_and_line PROTO ((const char *, linecol,
 						 const char *, va_list));
 static void v_warning_with_decl PROTO((tree, const char *, va_list));
 static void v_warning_for_asm PROTO((rtx, const char *, va_list));
 static void vwarning PROTO((const char *, va_list));
 static void vpedwarn PROTO((const char *, va_list));
 static void v_pedwarn_with_decl PROTO((tree, const char *, va_list));
-static void v_pedwarn_with_file_and_line PROTO((const char *, int,
+static void v_pedwarn_with_file_and_line PROTO((const char *, linecol,
 						const char *, va_list));
 static void vsorry PROTO((const char *, va_list));
 static void float_signal PROTO((int)) ATTRIBUTE_NORETURN;
@@ -248,10 +248,12 @@ char *input_filename;
 
 char *main_input_filename;
 
-/* Current line number in real source file.  */
+/* Current line and column numbers in real source file.  */
 
-int lineno;
+linecol linecolno;
 
+linecol unknown_linecol = { 0, 0 };
+
 /* Nonzero if it is unsafe to create any new pseudo registers.  */
 int no_new_pseudos;
 
@@ -1619,13 +1621,17 @@ fnotice VPROTO((FILE *file, const char *
 /* Report FILE and LINE (or program name), and optionally just WARN.  */
 
 static void
-report_file_and_line (file, line, warn)
+report_file_and_line (file, pos, warn)
      char *file;
-     int line;
+     linecol pos;
      int warn;
 {
   if (file)
-    fprintf (stderr, "%s:%d: ", file, line);
+    {
+      fprintf (stderr, "%s:%d: ", file, pos.line);
+      if (pos.column != 0)
+	fprintf (stderr, ":%d", pos.column);
+    }
   else
     fprintf (stderr, "%s: ", progname);
 
@@ -1650,14 +1656,14 @@ vmessage (prefix, msgid, ap)
 /* Print a message relevant to line LINE of file FILE.  */
 
 static void
-v_message_with_file_and_line (file, line, warn, msgid, ap)
+v_message_with_file_and_line (file, pos, warn, msgid, ap)
      const char *file;
-     int line;
+     linecol pos;
      int warn;
      const char *msgid;
      va_list ap;
 {
-  report_file_and_line (file, line, warn);
+  report_file_and_line (file, pos, warn);
   vnotice (stderr, msgid, ap);
   fputc ('\n', stderr);
 }
@@ -1674,7 +1680,7 @@ v_message_with_decl (decl, warn, msgid, 
   const char *p;
 
   report_file_and_line (DECL_SOURCE_FILE (decl),
-			DECL_SOURCE_LINE (decl), warn);
+			DECL_SOURCE_LINECOL (decl), warn);
 
   /* Do magic to get around lack of varargs support for insertion
      of arguments into existing list.  We know that the decl is first;
@@ -1729,7 +1735,7 @@ static void
 file_and_line_for_asm (insn, pfile, pline)
      rtx insn;
      char **pfile;
-     int *pline;
+     linecol *pline;
 {
   rtx body = PATTERN (insn);
   rtx asmop;
@@ -1751,36 +1757,37 @@ file_and_line_for_asm (insn, pfile, plin
   if (asmop)
     {
       *pfile = ASM_OPERANDS_SOURCE_FILE (asmop);
-      *pline = ASM_OPERANDS_SOURCE_LINE (asmop);
+      pline->line = ASM_OPERANDS_SOURCE_LINE (asmop);
+      pline->column = 0;  /* For now */
     }
   else
     {
       *pfile = input_filename;
-      *pline = lineno;
+      *pline = linecolno;
     }
 }
 
 /* Report an error at line LINE of file FILE.  */
 
 static void
-v_error_with_file_and_line (file, line, msgid, ap)
+v_error_with_file_and_line (file, pos, msgid, ap)
      const char *file;
-     int line;
+     linecol pos;
      const char *msgid;
      va_list ap;
 {
   count_error (0);
   report_error_function (file);
-  v_message_with_file_and_line (file, line, 0, msgid, ap);
+  v_message_with_file_and_line (file, pos, 0, msgid, ap);
 }
 
 void
-error_with_file_and_line VPROTO((const char *file, int line,
+error_with_file_and_line VPROTO((const char *file, linecol pos,
 				 const char *msgid, ...))
 {
 #ifndef ANSI_PROTOTYPES
   const char *file;
-  int line;
+  linecol pos;
   const char *msgid;
 #endif
   va_list ap;
@@ -1789,11 +1796,11 @@ error_with_file_and_line VPROTO((const c
 
 #ifndef ANSI_PROTOTYPES
   file = va_arg (ap, const char *);
-  line = va_arg (ap, int);
+  pos = va_arg (ap, linecol);
   msgid = va_arg (ap, const char *);
 #endif
 
-  v_error_with_file_and_line (file, line, msgid, ap);
+  v_error_with_file_and_line (file, pos, msgid, ap);
   va_end (ap);
 }
 
@@ -1843,7 +1850,7 @@ v_error_for_asm (insn, msgid, ap)
      va_list ap;
 {
   char *file;
-  int line;
+  linecol line;
 
   count_error (0);
   file_and_line_for_asm (insn, &file, &line);
@@ -1878,7 +1885,7 @@ verror (msgid, ap)
      const char *msgid;
      va_list ap;
 {
-  v_error_with_file_and_line (input_filename, lineno, msgid, ap);
+  v_error_with_file_and_line (input_filename, linecolno, msgid, ap);
 }
 
 void
@@ -1931,26 +1938,26 @@ fatal VPROTO((const char *msgid, ...))
 /* Report a warning at line LINE of file FILE.  */
 
 static void
-v_warning_with_file_and_line (file, line, msgid, ap)
+v_warning_with_file_and_line (file, pos, msgid, ap)
      const char *file;
-     int line;
+     linecol pos;
      const char *msgid;
      va_list ap;
 {
   if (count_error (1))
     {
       report_error_function (file);
-      v_message_with_file_and_line (file, line, 1, msgid, ap);
+      v_message_with_file_and_line (file, pos, 1, msgid, ap);
     }
 }
 
 void
-warning_with_file_and_line VPROTO((const char *file, int line,
+warning_with_file_and_line VPROTO((const char *file, linecol pos,
 				   const char *msgid, ...))
 {
 #ifndef ANSI_PROTOTYPES
   const char *file;
-  int line;
+  linecol pos;
   const char *msgid;
 #endif
   va_list ap;
@@ -1959,11 +1966,11 @@ warning_with_file_and_line VPROTO((const
 
 #ifndef ANSI_PROTOTYPES
   file = va_arg (ap, const char *);
-  line = va_arg (ap, int);
+  pos = va_arg (ap, linecol);
   msgid = va_arg (ap, const char *);
 #endif
 
-  v_warning_with_file_and_line (file, line, msgid, ap);
+  v_warning_with_file_and_line (file, pos, msgid, ap);
   va_end (ap);
 }
 
@@ -2017,11 +2024,11 @@ v_warning_for_asm (insn, msgid, ap)
   if (count_error (1))
     {
       char *file;
-      int line;
+      linecol pos;
 
-      file_and_line_for_asm (insn, &file, &line);
+      file_and_line_for_asm (insn, &file, &pos);
       report_error_function (file);
-      v_message_with_file_and_line (file, line, 1, msgid, ap);
+      v_message_with_file_and_line (file, pos, 1, msgid, ap);
     }
 }
 
@@ -2052,7 +2059,7 @@ vwarning (msgid, ap)
      const char *msgid;
      va_list ap;
 {
-  v_warning_with_file_and_line (input_filename, lineno, msgid, ap);
+  v_warning_with_file_and_line (input_filename, linecolno, msgid, ap);
 }
 
 void
@@ -2148,25 +2155,25 @@ pedwarn_with_decl VPROTO((tree decl, con
 }
 
 static void
-v_pedwarn_with_file_and_line (file, line, msgid, ap)
+v_pedwarn_with_file_and_line (file, pos, msgid, ap)
      const char *file;
-     int line;
+     linecol pos;
      const char *msgid;
      va_list ap;
 {
   if (flag_pedantic_errors)
-    v_error_with_file_and_line (file, line, msgid, ap);
+    v_error_with_file_and_line (file, pos, msgid, ap);
   else
-    v_warning_with_file_and_line (file, line, msgid, ap);
+    v_warning_with_file_and_line (file, pos, msgid, ap);
 }
 
 void
-pedwarn_with_file_and_line VPROTO((const char *file, int line,
+pedwarn_with_file_and_line VPROTO((const char *file, linecol pos,
 				   const char *msgid, ...))
 {
 #ifndef ANSI_PROTOTYPES
   const char *file;
-  int line;
+  linecol pos;
   const char *msgid;
 #endif
   va_list ap;
@@ -2175,11 +2182,11 @@ pedwarn_with_file_and_line VPROTO((const
 
 #ifndef ANSI_PROTOTYPES
   file = va_arg (ap, const char *);
-  line = va_arg (ap, int);
+  pos = va_arg (ap, linecol);
   msgid = va_arg (ap, const char *);
 #endif
 
-  v_pedwarn_with_file_and_line (file, line, msgid, ap);
+  v_pedwarn_with_file_and_line (file, pos, msgid, ap);
   va_end (ap);
 }
 
@@ -2192,7 +2199,11 @@ vsorry (msgid, ap)
 {
   sorrycount++;
   if (input_filename)
-    fprintf (stderr, "%s:%d: ", input_filename, lineno);
+    {
+      fprintf (stderr, "%s:%d: ", input_filename, linecolno.line);
+      if (linecolno.column != 0)
+	fprintf (stderr, ":%d", linecolno.column);
+    }
   else
     fprintf (stderr, "%s: ", progname);
   notice ("sorry, not implemented: ");
@@ -5587,19 +5598,19 @@ debug_end_source_file (lineno)
    initial whitespace, #, whitespace, directive-name, whitespace part.  */
 
 void
-debug_define (lineno, buffer)
-     register unsigned lineno ATTRIBUTE_UNUSED;
+debug_define (line, buffer)
+     register unsigned line ATTRIBUTE_UNUSED;
      register char *buffer ATTRIBUTE_UNUSED;
 {
 #ifdef DWARF_DEBUGGING_INFO
   if (debug_info_level == DINFO_LEVEL_VERBOSE
       && write_symbols == DWARF_DEBUG)
-    dwarfout_define (lineno, buffer);
+    dwarfout_define (line, buffer);
 #endif /* DWARF_DEBUGGING_INFO */
 #ifdef DWARF2_DEBUGGING_INFO
   if (debug_info_level == DINFO_LEVEL_VERBOSE
       && write_symbols == DWARF2_DEBUG)
-    dwarf2out_define (lineno, buffer);
+    dwarf2out_define (line, buffer);
 #endif /* DWARF2_DEBUGGING_INFO */
 }
 
@@ -5608,18 +5619,18 @@ debug_define (lineno, buffer)
    initial whitespace, #, whitespace, directive-name, whitespace part.  */
 
 void
-debug_undef (lineno, buffer)
-     register unsigned lineno ATTRIBUTE_UNUSED;
+debug_undef (line, buffer)
+     register unsigned line ATTRIBUTE_UNUSED;
      register char *buffer ATTRIBUTE_UNUSED;
 {
 #ifdef DWARF_DEBUGGING_INFO
   if (debug_info_level == DINFO_LEVEL_VERBOSE
       && write_symbols == DWARF_DEBUG)
-    dwarfout_undef (lineno, buffer);
+    dwarfout_undef (line, buffer);
 #endif /* DWARF_DEBUGGING_INFO */
 #ifdef DWARF2_DEBUGGING_INFO
   if (debug_info_level == DINFO_LEVEL_VERBOSE
       && write_symbols == DWARF2_DEBUG)
-    dwarf2out_undef (lineno, buffer);
+    dwarf2out_undef (line, buffer);
 #endif /* DWARF2_DEBUGGING_INFO */
 }
Index: toplev.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/toplev.h,v
retrieving revision 1.20
diff -u -p -r1.20 toplev.h
--- toplev.h	1999/03/19 01:01:01	1.20
+++ toplev.h	1999/03/30 01:33:33
@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA.  */
 #ifdef ANSI_PROTOTYPES
 union tree_node;
 struct rtx_def;
+struct linecol;
 #endif
 
 extern int read_integral_parameter	PROTO ((const char *, const char *,
@@ -51,13 +52,13 @@ extern void error			PVPROTO ((const char
 						ATTRIBUTE_PRINTF_1;
 extern void pedwarn			PVPROTO ((const char *, ...))
 						ATTRIBUTE_PRINTF_1;
-extern void pedwarn_with_file_and_line	PVPROTO ((const char *, int,
+extern void pedwarn_with_file_and_line	PVPROTO ((const char *, struct linecol,
 						  const char *, ...))
   ATTRIBUTE_PRINTF_3;
-extern void warning_with_file_and_line	PVPROTO ((const char *, int,
+extern void warning_with_file_and_line	PVPROTO ((const char *, struct linecol,
 						  const char *, ...))
   ATTRIBUTE_PRINTF_3;
-extern void error_with_file_and_line	PVPROTO ((const char *, int,
+extern void error_with_file_and_line	PVPROTO ((const char *, struct linecol,
 						  const char *, ...))
   ATTRIBUTE_PRINTF_3;
 extern void sorry			PVPROTO ((const char *, ...))
Index: tree.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/tree.c,v
retrieving revision 1.62
diff -u -p -r1.62 tree.c
--- tree.c	1999/03/23 11:20:47	1.62
+++ tree.c	1999/03/30 01:33:33
@@ -1096,7 +1096,7 @@ make_node (code)
 	DECL_ALIGN (t) = 1;
       DECL_IN_SYSTEM_HEADER (t)
 	= in_system_header && (obstack == &permanent_obstack);
-      DECL_SOURCE_LINE (t) = lineno;
+      DECL_SOURCE_LINECOL (t) = linecolno;
       DECL_SOURCE_FILE (t) = (input_filename) ? input_filename : "<built-in>";
       DECL_UID (t) = next_decl_uid++;
       /* Note that we have not yet computed the alias set for this
Index: unroll.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/unroll.c,v
retrieving revision 1.54
diff -u -p -r1.54 unroll.c
--- unroll.c	1999/03/12 12:46:36	1.54
+++ unroll.c	1999/03/30 01:33:34
@@ -2138,8 +2138,8 @@ copy_loop_body (copy_start, copy_end, ma
 	      && ((NOTE_LINE_NUMBER (insn) != NOTE_INSN_LOOP_VTOP
 		   && NOTE_LINE_NUMBER (insn) != NOTE_INSN_LOOP_CONT)
 		  || (last_iteration && unroll_type != UNROLL_COMPLETELY)))
-	    copy = emit_note (NOTE_SOURCE_FILE (insn),
-			      NOTE_LINE_NUMBER (insn));
+	    copy = emit_raw_note (NOTE_SOURCE_FILE (insn),
+				  NOTE_LINE_LINECOL (insn));
 	  else
 	    copy = 0;
 	  break;
@@ -2182,7 +2182,8 @@ copy_loop_body (copy_start, copy_end, ma
 	  if (GET_CODE (insn) == NOTE
 	      && NOTE_LINE_NUMBER (insn) != NOTE_INSN_DELETED
 	      && NOTE_LINE_NUMBER (insn) != NOTE_INSN_BASIC_BLOCK)
-	    emit_note (NOTE_SOURCE_FILE (insn), NOTE_LINE_NUMBER (insn));
+	    emit_raw_note (NOTE_SOURCE_FILE (insn),
+			   NOTE_LINE_LINECOL (insn));
 	}
     }
 
Index: varasm.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/varasm.c,v
retrieving revision 1.57
diff -u -p -r1.57 varasm.c
--- varasm.c	1999/03/28 15:35:04	1.57
+++ varasm.c	1999/03/30 01:33:34
@@ -1226,7 +1226,7 @@ assemble_variable (decl, top_level, at_e
   if (!dont_output_data && DECL_SIZE (decl) == 0)
     {
       error_with_file_and_line (DECL_SOURCE_FILE (decl),
-				DECL_SOURCE_LINE (decl),
+				DECL_SOURCE_LINECOL (decl),
 				"storage size of `%s' isn't known",
 				IDENTIFIER_POINTER (DECL_NAME (decl)));
       TREE_ASM_WRITTEN (decl) = 1;


More information about the Gcc-patches mailing list