This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

unify line number handling patch 1


Hi,
gcc has lost of code which saves and restores line number or
line number and file name information. These bits should really only
save and restore a 'location' thing. this patch is a step in that direction.
We currently have two header files dealing with location, input.h and location.h.
I have folded the latter into the former, started to use a global
location structure object, and hidden its two members behind a couple
of macros. the remainder of the patch is name tidying so that
access of the global lineno becomes use of the macro input_line, and
nowhere uses input_filename as a local name (as that two is now a macro).
I couldn't simply #define lineno, as that is used in places as fieldname.
Something had to change and I felt input_line matched the name input_filename.

No other changes are made with this patch. Now parts of the compiler can
start using input_location as an opaque type, and I'll start going through
doing that after this patch goes in.

btw, at the end of this I hope to remove a field from _DECL nodes :)

booted & tested on i686-pc-linux-gnu, ok?

nathan
--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
         The voices in my head said this was stupid too
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org

2003-04-29  Nathan Sidwell  <nathan@codesourcery.com>

	* Makefile.in (TREE_H): Replace location.h with input.h.
	(GTFILES) Remove location.h
	(gt-lists.h): Replace gt-location.h with gt-input.h
	* input.h (input_filename, lineno): Remove.
	(location_s, location_t): Move from location.h.
	(input_location): New.
	(input_filename, input_line): New #defines.
	* location.h: Remove.
	* tree.h: Replace location.h with input.h.
	(input_filename, lineno): Remove.
	* scan.h (lineno): Remove (twice!).
	* diagnostic.h: Replace location.h with input.h.
	* toplev.c (input_filename, lineno): Remove.
	(input_location): Define.
	(push_srcloc, pop_srcloc): Adjust.
	* c-common.c (c_expand_start_cond): Replace lineno with
	input_line.
	(fname_decl): Likewise.
	* c-decl.c (poplevel, pop_label_level, lookup_label, lookup_tag,
	store_parm_decls, c_expand_body_1): Likewise.
	* c-errors.c (pedwarn_c99): Likewise.
	* c-format.c (status_warning): Likewise.
	* c-lex.c (fe_file_change, cb_def_pragma, c_lex): Likewise.
	* c-opts.c (c_common_post_options, c_common_parse_file): Likewise.
	* c-parse.in (save_filename, maybe_type_qual, ifc): Likwise.
	* c-semantics.c (finish_stmt_tree, build_stmt, emit_local_var,
	gentrtl_goto_stmt, genrtl_expr_stmt_value, genrtl_decl_stmt,
	genrtl_if_stmt, genrtl_while_stmt, genrtl_do_stmt,
	genrtl_return_stmt, genrtl_for_stmt, build_break_stmt,
	build_continue_stmt, genrtl_switch_stmt, genrtl_asm_stmt,
	prep_stmt, find_reachable_label, expand_unreachable_stmt): Likewise.
	* coverage.c (create_coverage): Likewise.
	* diagnostic.c (pedwarn, sorry, error, fatal_error,
	internal_error, warning, diagnostic_report_current_module,
	inform): Likewise.
	* expr.c (expand_expr): Likewise.
	* integrate.c (expand_inline_function,
	output_inline_function): Likewise.
	* rtl-error.c (file_and_line_for_asm): Likewise.
	* tree-inline.c (find_alloca_call, find_builtin_longjmp_call,
	walk_tree): Likewise.
	* tree.c (make_node): Likewise.
	* gcc.h (input_filename, input_filename_length): Remove.
	* dwarf2out.c (dwarf2out_init, dwarf2out_finish): Change parameter
	name from input_filename.
	* ada, cp, j, java, objc, treelang: Likewise.

	ada
	* trans.c (build_unit_elab, set_lineno): Replace lineno with
	input_line. 
	* utils.c (pushdecl, create_label_decl, begin_subprog_body,
	end_subprog_body): Likewise.
	* utils2.c (build_call_raise): Likewise.

	cp
	* class.c (finish_struct): Replace lineno with input_line.
	* decl.c (push_binding_level, pop_binding_level,
	suspend_binding_level, resume_binding_level, make_label_decl,
	use_label, start_function): Likewise.
	* decl2.c (warn_if_unknown_interface,
	start_static_initialization_or_destruction,
	generate_ctor_or_dtor_function, finish_file): Likewise.
	* error.c (cp_line_of, print_instantiation_full_context,
	print_instantiation_context): Likewise.
	* except.c (check_handlers_1, check_handlers): Likewise.
	* init.c (create_temporary_var): Likewise.
	* method.c (use_thunk, synthesize_method): Likewise.
	* parser.c (cp_lexer_set_source_position_from_token,
	cp_lexer_get_preprocessor_token): Likewise.
	* pt.c (push_tinst_level, pop_tinst_level,
	tsubst_friend_function, instantiate_class_template, tsubst_decl,
	tsubst, tsubst_expr, instantiate_decl): Likewise.
	* semantics.c (genrtl_try_block, finish_label_stmt,
	begin_class_definition, expand_body,
	genrtl_finish_function): Likewise. 
	* tree.c (build_min_nt, build_min): Likewise.

	f
	* ansify.c (die_unless): Replace lineno with input_line.
	* com.c (ffecom_subscript_check_, ffecom_do_entry_,
	ffecom_gen_sfuncdef_, ffecom_start_progunit_,
	ffecom_sym_transform_, ffecom_sym_transform_assign_,
	bison_rule_pushlevel_, bison_rule_compstmt_, finish_function,
	store_parm_decls): Likewise.
	* intrin.c (ffeintrin_fulfill_generic): Likewise.
	* lex.c (ffelex_file_pop_): Change parameter name from
	input_file.
	(ffelex_file_push_): Likewise.
	(ffelex_hash_, ffelex_include_, ffelex_next_line_,
	ffelex_file_fixed, ffelex_file_free): Replace lineno with input_line.
	* std.c (ffestd_exec_end): Likewise.
	* ste.c (ffeste_emit_line_note_): Likewise.
	(struct gbe_block): Rename field from input_filename.
	(ffeste_start_block_, ffeste_start_stmt_): Replace lineno with
	input_line.
	* ste.h (ffeste_filelinenum, ffeste_set_line): Likewise.

	java
	* lex.h (lineno): Remove declaration.
	* check-init.c (check_init): Replace lineno with input_line.
	* class.c (push_class): Likewise.
	* decl.c (complete_start_java_method, end_java_method): Likewise.
	* expr.c (expand_byte_code): Likewise.
	* jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
	* jcf-write.c (generate_bytecode_insns): Likewise.
	* lex.c (java_init_lex, java_allocate_new_line,
	do_java_lex): Likewise.
	* parse-scan.y: #include include.h.
	(input_location): Define.
	(lineno): Remove.
	(reset_report): Replace lineno with input_line.
	* parse.h (YYNOT_TWICE): Likewise.
	* parse.y (empty_statement, expression_statement,
	java_pop_parser_context, java_parser_context_save_global,
	yyerror, register_fields, method_header, safe_layout_class,
	find_in_imports_on_demand, create_artificial_method,
	source_end_java_method, start_complete_expand_method,
	build_thisn_assign, java_complete_lhs,
	maybe_absorb_scoping_block): Likewise.

	objc
	* objc-act.c (objc_init): Replace lineno with input_line.
	(build_module_descriptor, build_selector_translation_table,
	build_protocol_template, build_method_prototype_list_template,
	build_category_template, build_selector_table,
	build_class_template, build_super_template, build_ivar_template,
	build_ivar_list_template, build_method_list_template,
	build_method_template, add_instance_variable): Likewise.

	treelang
	* tree1.c (treelang_init): Replace lineno with input_line.

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
retrieving revision 1.17645
diff -c -3 -p -r1.17645 ChangeLog
*** ChangeLog	30 Apr 2003 14:17:25 -0000	1.17645
--- ChangeLog	30 Apr 2003 16:21:01 -0000
***************
*** 1,3 ****
--- 1,8 ----
+ 2003-04-30  Nathan Sidwell  <nathan@codesourcery.com>
+ 
+ 	* tree.h (DECL_POINTER_DEPTH): Remove.
+ 	(struct tree_decl): Remove pointer_depth.
+ 	
  2003-04-30  Andreas Schwab  <schwab@suse.de>
  
  	* doc/extend.texi (Other Builtins): Enclose multiple word data
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1044
diff -c -3 -p -r1.1044 Makefile.in
*** Makefile.in	29 Apr 2003 20:34:45 -0000	1.1044
--- Makefile.in	30 Apr 2003 16:21:12 -0000
*************** RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H)
*** 633,639 ****
  RTL_H = $(RTL_BASE_H) genrtl.h
  PARAMS_H = params.h params.def
  TREE_H = tree.h tree.def $(MACHMODE_H) tree-check.h version.h builtins.def \
!           location.h
  BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h $(PARTITION_H) \
            hard-reg-set.h
  COVERAGE_H = coverage.h gcov-io.h gcov-iov.h
--- 633,639 ----
  RTL_H = $(RTL_BASE_H) genrtl.h
  PARAMS_H = params.h params.def
  TREE_H = tree.h tree.def $(MACHMODE_H) tree-check.h version.h builtins.def \
!           input.h
  BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h $(PARTITION_H) \
            hard-reg-set.h
  COVERAGE_H = coverage.h gcov-io.h gcov-iov.h
*************** s-preds: genpreds$(build_exeext) $(srcdi
*** 1968,1979 ****
  	$(SHELL) $(srcdir)/move-if-change tmp-preds.h tm-preds.h
  	$(STAMP) s-preds
  
! GTFILES = $(srcdir)/location.h $(srcdir)/coretypes.h $(srcdir)/cpplib.h \
    $(host_xm_file_list) $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) \
    $(srcdir)/bitmap.h $(srcdir)/coverage.c $(srcdir)/function.h  $(srcdir)/rtl.h \
    $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(srcdir)/hashtable.h \
    $(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/ssa.h $(srcdir)/insn-addr.h \
!   $(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/location.h \
    $(srcdir)/c-common.h $(srcdir)/c-tree.h \
    $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
    $(srcdir)/dbxout.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \
--- 1968,1979 ----
  	$(SHELL) $(srcdir)/move-if-change tmp-preds.h tm-preds.h
  	$(STAMP) s-preds
  
! GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h $(srcdir)/cpplib.h \
    $(host_xm_file_list) $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) \
    $(srcdir)/bitmap.h $(srcdir)/coverage.c $(srcdir)/function.h  $(srcdir)/rtl.h \
    $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(srcdir)/hashtable.h \
    $(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/ssa.h $(srcdir)/insn-addr.h \
!   $(srcdir)/cselib.h $(srcdir)/basic-block.h \
    $(srcdir)/c-common.h $(srcdir)/c-tree.h \
    $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
    $(srcdir)/dbxout.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \
*************** gt-lists.h gt-alias.h gt-cselib.h gt-fol
*** 1999,2005 ****
  gt-expr.h gt-sdbout.h gt-optabs.h gt-bitmap.h \
  gt-dwarf2out.h gt-ra-build.h gt-reg-stack.h gt-dwarf2asm.h \
  gt-dbxout.h gt-c-common.h gt-c-decl.h gt-c-parse.h \
! gt-c-pragma.h gt-c-objc-common.h gtype-c.h gt-location.h \
  gt-stringpool.h : s-gtype ; @true
  
  gtyp-gen.h: Makefile
--- 1999,2005 ----
  gt-expr.h gt-sdbout.h gt-optabs.h gt-bitmap.h \
  gt-dwarf2out.h gt-ra-build.h gt-reg-stack.h gt-dwarf2asm.h \
  gt-dbxout.h gt-c-common.h gt-c-decl.h gt-c-parse.h \
! gt-c-pragma.h gt-c-objc-common.h gtype-c.h gt-input.h \
  gt-stringpool.h : s-gtype ; @true
  
  gtyp-gen.h: Makefile
Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.410
diff -c -3 -p -r1.410 c-common.c
*** c-common.c	14 Apr 2003 03:13:03 -0000	1.410
--- c-common.c	30 Apr 2003 16:21:26 -0000
*************** c_expand_start_cond (cond, compstmt_coun
*** 920,926 ****
    /* 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].needs_warning = 0;
    if_stack[if_stack_pointer].if_stmt = if_stmt;
    if_stack_pointer++;
--- 920,926 ----
    /* 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 = input_line;
    if_stack[if_stack_pointer].needs_warning = 0;
    if_stack[if_stack_pointer].if_stmt = if_stmt;
    if_stack_pointer++;
*************** fname_decl (rid, id)
*** 1160,1167 ****
  	 beginning of the function and this line number will be wrong.
  	 To avoid this problem set the lineno to 0 here; that prevents
  	 it from appearing in the RTL.  */
!       int saved_lineno = lineno;
!       lineno = 0;
        
        decl = (*make_fname_decl) (id, fname_vars[ix].pretty);
        if (last_tree != saved_last_tree)
--- 1160,1167 ----
  	 beginning of the function and this line number will be wrong.
  	 To avoid this problem set the lineno to 0 here; that prevents
  	 it from appearing in the RTL.  */
!       int saved_lineno = input_line;
!       input_line = 0;
        
        decl = (*make_fname_decl) (id, fname_vars[ix].pretty);
        if (last_tree != saved_last_tree)
*************** fname_decl (rid, id)
*** 1177,1183 ****
  						 saved_function_name_decls);
  	}
        *fname_vars[ix].decl = decl;
!       lineno = saved_lineno;
      }
    if (!ix && !current_function_decl)
      pedwarn_with_decl (decl, "`%s' is not defined outside of function scope");
--- 1177,1183 ----
  						 saved_function_name_decls);
  	}
        *fname_vars[ix].decl = decl;
!       input_line = saved_lineno;
      }
    if (!ix && !current_function_decl)
      pedwarn_with_decl (decl, "`%s' is not defined outside of function scope");
Index: c-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.383
diff -c -3 -p -r1.383 c-decl.c
*** c-decl.c	28 Apr 2003 19:58:49 -0000	1.383
--- c-decl.c	30 Apr 2003 16:21:42 -0000
*************** poplevel (keep, reverse, functionbody)
*** 617,623 ****
  	    {
  	      error_with_decl (label, "label `%s' used but not defined");
  	      /* Avoid crashing later.  */
! 	      define_label (input_filename, lineno,
  			    DECL_NAME (label));
  	    }
  	  else if (warn_unused_label && !TREE_USED (label))
--- 617,623 ----
  	    {
  	      error_with_decl (label, "label `%s' used but not defined");
  	      /* Avoid crashing later.  */
! 	      define_label (input_filename, input_line,
  			    DECL_NAME (label));
  	    }
  	  else if (warn_unused_label && !TREE_USED (label))
*************** pop_label_level ()
*** 711,717 ****
  	      error_with_decl (TREE_VALUE (link),
  			       "label `%s' used but not defined");
  	      /* Avoid crashing later.  */
! 	      define_label (input_filename, lineno,
  			    DECL_NAME (TREE_VALUE (link)));
  	    }
  	  else if (warn_unused_label && !TREE_USED (TREE_VALUE (link)))
--- 711,717 ----
  	      error_with_decl (TREE_VALUE (link),
  			       "label `%s' used but not defined");
  	      /* Avoid crashing later.  */
! 	      define_label (input_filename, input_line,
  			    DECL_NAME (TREE_VALUE (link)));
  	    }
  	  else if (warn_unused_label && !TREE_USED (TREE_VALUE (link)))
*************** lookup_label (id)
*** 2019,2025 ****
  
    /* 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_FILE (decl) = input_filename;
  
    IDENTIFIER_LABEL_VALUE (id) = decl;
--- 2019,2025 ----
  
    /* Say where one reference is to the label,
       for the sake of the error if it is not defined.  */
!   DECL_SOURCE_LINE (decl) = input_line;
    DECL_SOURCE_FILE (decl) = input_filename;
  
    IDENTIFIER_LABEL_VALUE (id) = decl;
*************** lookup_tag (code, name, thislevel_only)
*** 2184,2190 ****
        /* Definition isn't the kind we were looking for.  */
        pending_invalid_xref = name;
        pending_invalid_xref_file = input_filename;
!       pending_invalid_xref_line = lineno;
  
        /* If in the same binding level as a declaration as a tag
  	 of a different type, this must not be allowed to
--- 2184,2190 ----
        /* Definition isn't the kind we were looking for.  */
        pending_invalid_xref = name;
        pending_invalid_xref_file = input_filename;
!       pending_invalid_xref_line = input_line;
  
        /* If in the same binding level as a declaration as a tag
  	 of a different type, this must not be allowed to
*************** store_parm_decls ()
*** 6079,6085 ****
    gen_aux_info_record (fndecl, 1, 0, prototype);
  
    /* Initialize the RTL code for the function.  */
!   init_function_start (fndecl, input_filename, lineno);
  
    /* Begin the statement tree for this function.  */
    begin_stmt_tree (&DECL_SAVED_TREE (current_function_decl));
--- 6079,6085 ----
    gen_aux_info_record (fndecl, 1, 0, prototype);
  
    /* Initialize the RTL code for the function.  */
!   init_function_start (fndecl, input_filename, input_line);
  
    /* Begin the statement tree for this function.  */
    begin_stmt_tree (&DECL_SAVED_TREE (current_function_decl));
*************** c_expand_body_1 (fndecl, nested_p)
*** 6339,6345 ****
    current_function_decl = fndecl;
    input_filename = DECL_SOURCE_FILE (fndecl);
    init_function_start (fndecl, input_filename, DECL_SOURCE_LINE (fndecl));
!   lineno = DECL_SOURCE_LINE (fndecl);
  
    /* This function is being processed in whole-function mode.  */
    cfun->x_whole_function_mode_p = 1;
--- 6339,6345 ----
    current_function_decl = fndecl;
    input_filename = DECL_SOURCE_FILE (fndecl);
    init_function_start (fndecl, input_filename, DECL_SOURCE_LINE (fndecl));
!   input_line = DECL_SOURCE_LINE (fndecl);
  
    /* This function is being processed in whole-function mode.  */
    cfun->x_whole_function_mode_p = 1;
*************** c_expand_body_1 (fndecl, nested_p)
*** 6384,6390 ****
      (*lang_expand_function_end) ();
  
    /* Generate rtl for function exit.  */
!   expand_function_end (input_filename, lineno, 0);
  
    /* If this is a nested function, protect the local variables in the stack
       above us from being collected while we're compiling this function.  */
--- 6384,6390 ----
      (*lang_expand_function_end) ();
  
    /* Generate rtl for function exit.  */
!   expand_function_end (input_filename, input_line, 0);
  
    /* If this is a nested function, protect the local variables in the stack
       above us from being collected while we're compiling this function.  */
Index: c-errors.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-errors.c,v
retrieving revision 1.7
diff -c -3 -p -r1.7 c-errors.c
*** c-errors.c	16 Dec 2002 18:19:01 -0000	1.7
--- c-errors.c	30 Apr 2003 16:21:42 -0000
***************
*** 1,5 ****
  /* Various diagnostic subroutines for the GNU C language.
!    Copyright (C) 2000, 2001 Free Software Foundation, Inc.
     Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
  
  This file is part of GCC.
--- 1,5 ----
  /* Various diagnostic subroutines for the GNU C language.
!    Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
     Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
  
  This file is part of GCC.
*************** pedwarn_c99 VPARAMS ((const char *msgid,
*** 38,44 ****
    VA_OPEN (ap, msgid);
    VA_FIXEDARG (ap, const char *, msgid);
  
!   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, lineno,
                         flag_isoc99 ? pedantic_error_kind () : DK_WARNING);
    report_diagnostic (&diagnostic);
    VA_CLOSE (ap);
--- 38,44 ----
    VA_OPEN (ap, msgid);
    VA_FIXEDARG (ap, const char *, msgid);
  
!   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, input_line,
                         flag_isoc99 ? pedantic_error_kind () : DK_WARNING);
    report_diagnostic (&diagnostic);
    VA_CLOSE (ap);
Index: c-format.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-format.c,v
retrieving revision 1.31
diff -c -3 -p -r1.31 c-format.c
*** c-format.c	16 Dec 2002 18:19:01 -0000	1.31
--- c-format.c	30 Apr 2003 16:21:48 -0000
***************
*** 1,6 ****
  /* Check calls to formatted I/O functions (-Wformat).
     Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
!    2001, 2002 Free Software Foundation, Inc.
  
  This file is part of GCC.
  
--- 1,6 ----
  /* Check calls to formatted I/O functions (-Wformat).
     Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
!    2001, 2002, 2003 Free Software Foundation, Inc.
  
  This file is part of GCC.
  
*************** status_warning VPARAMS ((int *status, co
*** 1009,1016 ****
    else
      {
        /* This duplicates the warning function behavior.  */
!       diagnostic_set_info (&diagnostic, _(msgid), &ap, input_filename, lineno,
!                            DK_WARNING);
        report_diagnostic (&diagnostic);
      }
  
--- 1009,1016 ----
    else
      {
        /* This duplicates the warning function behavior.  */
!       diagnostic_set_info (&diagnostic, _(msgid), &ap,
! 			   input_filename, input_line, DK_WARNING);
        report_diagnostic (&diagnostic);
      }
  
Index: c-lex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-lex.c,v
retrieving revision 1.202
diff -c -3 -p -r1.202 c-lex.c
*** c-lex.c	23 Apr 2003 22:43:57 -0000	1.202
--- c-lex.c	30 Apr 2003 16:21:49 -0000
*************** fe_file_change (new_map)
*** 228,234 ****
  	{
            int included_at = SOURCE_LINE (new_map - 1, new_map->from_line - 1);
  
! 	  lineno = included_at;
  	  push_srcloc (new_map->to_file, 1);
  	  (*debug_hooks->start_source_file) (included_at, new_map->to_file);
  #ifndef NO_IMPLICIT_EXTERN_C
--- 228,234 ----
  	{
            int included_at = SOURCE_LINE (new_map - 1, new_map->from_line - 1);
  
! 	  input_line = included_at;
  	  push_srcloc (new_map->to_file, 1);
  	  (*debug_hooks->start_source_file) (included_at, new_map->to_file);
  #ifndef NO_IMPLICIT_EXTERN_C
*************** fe_file_change (new_map)
*** 260,266 ****
    update_header_times (new_map->to_file);
    in_system_header = new_map->sysp != 0;
    input_filename = new_map->to_file;
!   lineno = to_line;
    map = new_map;
  
    /* Hook for C++.  */
--- 260,266 ----
    update_header_times (new_map->to_file);
    in_system_header = new_map->sysp != 0;
    input_filename = new_map->to_file;
!   input_line = to_line;
    map = new_map;
  
    /* Hook for C++.  */
*************** cb_def_pragma (pfile, line)
*** 290,296 ****
  	    name = cpp_token_as_text (pfile, s);
  	}
  
!       lineno = SOURCE_LINE (map, line);
        warning ("ignoring #pragma %s %s", space, name);
      }
  }
--- 290,296 ----
  	    name = cpp_token_as_text (pfile, s);
  	}
  
!       input_line = SOURCE_LINE (map, line);
        warning ("ignoring #pragma %s %s", space, name);
      }
  }
*************** c_lex (value)
*** 333,339 ****
    /* The C++ front end does horrible things with the current line
       number.  To ensure an accurate line number, we must reset it
       every time we return a token.  */
!   lineno = src_lineno;
  
    *value = NULL_TREE;
    switch (tok->type)
--- 333,339 ----
    /* The C++ front end does horrible things with the current line
       number.  To ensure an accurate line number, we must reset it
       every time we return a token.  */
!   input_line = src_lineno;
  
    *value = NULL_TREE;
    switch (tok->type)
Index: c-opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-opts.c,v
retrieving revision 1.40
diff -c -3 -p -r1.40 c-opts.c
*** c-opts.c	20 Mar 2003 16:46:17 -0000	1.40
--- c-opts.c	30 Apr 2003 16:21:53 -0000
*************** c_common_post_options (pfilename)
*** 1564,1570 ****
        init_c_lex ();
  
        /* Yuk.  WTF is this?  I do know ObjC relies on it somewhere.  */
!       lineno = 0;
      }
  
    cpp_get_callbacks (parse_in)->file_change = cb_file_change;
--- 1564,1570 ----
        init_c_lex ();
  
        /* Yuk.  WTF is this?  I do know ObjC relies on it somewhere.  */
!       input_line = 0;
      }
  
    cpp_get_callbacks (parse_in)->file_change = cb_file_change;
*************** c_common_post_options (pfilename)
*** 1572,1579 ****
    /* NOTE: we use in_fname here, not the one supplied.  */
    *pfilename = cpp_read_main_file (parse_in, in_fname);
  
!   saved_lineno = lineno;
!   lineno = 0;
  
    /* If an error has occurred in cpplib, note it so we fail
       immediately.  */
--- 1572,1579 ----
    /* NOTE: we use in_fname here, not the one supplied.  */
    *pfilename = cpp_read_main_file (parse_in, in_fname);
  
!   saved_lineno = input_line;
!   input_line = 0;
  
    /* If an error has occurred in cpplib, note it so we fail
       immediately.  */
*************** c_common_post_options (pfilename)
*** 1586,1592 ****
  bool
  c_common_init ()
  {
!   lineno = saved_lineno;
  
    /* Set up preprocessor arithmetic.  Must be done after call to
       c_common_nodes_and_builtins for type nodes to be good.  */
--- 1586,1592 ----
  bool
  c_common_init ()
  {
!   input_line = saved_lineno;
  
    /* Set up preprocessor arithmetic.  Must be done after call to
       c_common_nodes_and_builtins for type nodes to be good.  */
*************** c_common_parse_file (set_yydebug)
*** 1624,1630 ****
    warning ("YYDEBUG not defined");
  #endif
  
!   (*debug_hooks->start_source_file) (lineno, input_filename);
    finish_options();
    pch_init();
    yyparse ();
--- 1624,1630 ----
    warning ("YYDEBUG not defined");
  #endif
  
!   (*debug_hooks->start_source_file) (input_line, input_filename);
    finish_options();
    pch_init();
    yyparse ();
Index: c-parse.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-parse.in,v
retrieving revision 1.156
diff -c -3 -p -r1.156 c-parse.in
*** c-parse.in	28 Jan 2003 01:56:32 -0000	1.156
--- c-parse.in	30 Apr 2003 16:22:01 -0000
***************
*** 1,6 ****
! /* YACC parser for C syntax and for Objective C.  -*-c-*-
     Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996,
!    1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
  
  This file is part of GCC.
  
--- 1,6 ----
!  /* YACC parser for C syntax and for Objective C.  -*-c-*-
     Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996,
!    1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
  
  This file is part of GCC.
  
*************** do {									\
*** 138,143 ****
--- 138,144 ----
  
  /* String constants in raw form.
     yylval is a STRING_CST node.  */
+ 
  %token STRING
  
  /* "...", used for functions with variable arglists.  */
*************** save_filename:
*** 2250,2256 ****
  save_lineno:
  		{ if (yychar == YYEMPTY)
  		    yychar = YYLEX;
! 		  $$ = lineno; }
  	;
  
  lineno_labeled_stmt:
--- 2251,2257 ----
  save_lineno:
  		{ if (yychar == YYEMPTY)
  		    yychar = YYLEX;
! 		  $$ = input_line; }
  	;
  
  lineno_labeled_stmt:
*************** label:	  CASE expr_no_commas ':'
*** 2455,2464 ****
  
  maybe_type_qual:
  	/* empty */
! 		{ emit_line_note (input_filename, lineno);
  		  $$ = NULL_TREE; }
  	| TYPE_QUAL
! 		{ emit_line_note (input_filename, lineno); }
  	;
  
  xexpr:
--- 2456,2465 ----
  
  maybe_type_qual:
  	/* empty */
! 		{ emit_line_note (input_filename, input_line);
  		  $$ = NULL_TREE; }
  	| TYPE_QUAL
! 		{ emit_line_note (input_filename, input_line); }
  	;
  
  xexpr:
*************** ifc
*** 3690,3700 ****
        static int last_lineno = 0;
        static const char *last_input_filename = 0;
        if (warn_traditional && !in_system_header
! 	  && (lineno != last_lineno || !last_input_filename ||
  	      strcmp (last_input_filename, input_filename)))
  	{
  	  warning ("traditional C rejects string concatenation");
! 	  last_lineno = lineno;
  	  last_input_filename = input_filename;
  	}
  end ifc
--- 3691,3701 ----
        static int last_lineno = 0;
        static const char *last_input_filename = 0;
        if (warn_traditional && !in_system_header
! 	  && (input_line != last_lineno || !last_input_filename ||
  	      strcmp (last_input_filename, input_filename)))
  	{
  	  warning ("traditional C rejects string concatenation");
! 	  last_lineno = input_line;
  	  last_input_filename = input_filename;
  	}
  end ifc
Index: c-semantics.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-semantics.c,v
retrieving revision 1.56
diff -c -3 -p -r1.56 c-semantics.c
*** c-semantics.c	29 Apr 2003 20:39:12 -0000	1.56
--- c-semantics.c	30 Apr 2003 16:22:03 -0000
*************** finish_stmt_tree (t)
*** 181,187 ****
      {
        /* The line-number recorded in the outermost statement in a function
  	 is the line number of the end of the function.  */
!       STMT_LINENO (stmt) = lineno;
        STMT_LINENO_FOR_FN_P (stmt) = 1;
      }
  }
--- 181,187 ----
      {
        /* The line-number recorded in the outermost statement in a function
  	 is the line number of the end of the function.  */
!       STMT_LINENO (stmt) = input_line;
        STMT_LINENO_FOR_FN_P (stmt) = 1;
      }
  }
*************** build_stmt VPARAMS ((enum tree_code code
*** 204,210 ****
  
    t = make_node (code);
    length = TREE_CODE_LENGTH (code);
!   STMT_LINENO (t) = lineno;
  
    for (i = 0; i < length; i++)
      TREE_OPERAND (t, i) = va_arg (p, tree);
--- 204,210 ----
  
    t = make_node (code);
    length = TREE_CODE_LENGTH (code);
!   STMT_LINENO (t) = input_line;
  
    for (i = 0; i < length; i++)
      TREE_OPERAND (t, i) = va_arg (p, tree);
*************** emit_local_var (decl)
*** 301,307 ****
  void
  genrtl_do_pushlevel ()
  {
!   emit_line_note (input_filename, lineno);
    clear_last_expr ();
  }
  
--- 301,307 ----
  void
  genrtl_do_pushlevel ()
  {
!   emit_line_note (input_filename, input_line);
    clear_last_expr ();
  }
  
*************** genrtl_goto_stmt (destination)
*** 319,325 ****
    if (TREE_CODE (destination) == LABEL_DECL)
      TREE_USED (destination) = 1;
    
!   emit_line_note (input_filename, lineno);
    
    if (TREE_CODE (destination) == LABEL_DECL)
      {
--- 319,325 ----
    if (TREE_CODE (destination) == LABEL_DECL)
      TREE_USED (destination) = 1;
    
!   emit_line_note (input_filename, input_line);
    
    if (TREE_CODE (destination) == LABEL_DECL)
      {
*************** genrtl_expr_stmt_value (expr, want_value
*** 355,361 ****
  {
    if (expr != NULL_TREE)
      {
!       emit_line_note (input_filename, lineno);
        
        if (stmts_are_full_exprs_p ())
  	expand_start_target_temps ();
--- 355,361 ----
  {
    if (expr != NULL_TREE)
      {
!       emit_line_note (input_filename, input_line);
        
        if (stmts_are_full_exprs_p ())
  	expand_start_target_temps ();
*************** genrtl_decl_stmt (t)
*** 375,381 ****
       tree t;
  {
    tree decl;
!   emit_line_note (input_filename, lineno);
    decl = DECL_STMT_DECL (t);
    /* If this is a declaration for an automatic local
       variable, initialize it.  Note that we might also see a
--- 375,381 ----
       tree t;
  {
    tree decl;
!   emit_line_note (input_filename, input_line);
    decl = DECL_STMT_DECL (t);
    /* If this is a declaration for an automatic local
       variable, initialize it.  Note that we might also see a
*************** genrtl_if_stmt (t)
*** 412,418 ****
    tree cond;
    genrtl_do_pushlevel ();
    cond = expand_cond (IF_COND (t));
!   emit_line_note (input_filename, lineno);
    expand_start_cond (cond, 0);
    if (THEN_CLAUSE (t))
      {
--- 412,418 ----
    tree cond;
    genrtl_do_pushlevel ();
    cond = expand_cond (IF_COND (t));
!   emit_line_note (input_filename, input_line);
    expand_start_cond (cond, 0);
    if (THEN_CLAUSE (t))
      {
*************** genrtl_while_stmt (t)
*** 442,455 ****
    tree cond = WHILE_COND (t);
  
    emit_nop ();
!   emit_line_note (input_filename, lineno);
    expand_start_loop (1); 
    genrtl_do_pushlevel ();
  
    if (cond && !integer_nonzerop (cond))
      {
        cond = expand_cond (cond);
!       emit_line_note (input_filename, lineno);
        expand_exit_loop_top_cond (0, cond);
        genrtl_do_pushlevel ();
      }
--- 442,455 ----
    tree cond = WHILE_COND (t);
  
    emit_nop ();
!   emit_line_note (input_filename, input_line);
    expand_start_loop (1); 
    genrtl_do_pushlevel ();
  
    if (cond && !integer_nonzerop (cond))
      {
        cond = expand_cond (cond);
!       emit_line_note (input_filename, input_line);
        expand_exit_loop_top_cond (0, cond);
        genrtl_do_pushlevel ();
      }
*************** genrtl_do_stmt (t)
*** 481,505 ****
    else if (integer_nonzerop (cond))
      {
        emit_nop ();
!       emit_line_note (input_filename, lineno);
        expand_start_loop (1);
  
        expand_stmt (DO_BODY (t));
  
!       emit_line_note (input_filename, lineno);
        expand_end_loop ();
      }
    else
      {
        emit_nop ();
!       emit_line_note (input_filename, lineno);
        expand_start_loop_continue_elsewhere (1);
  
        expand_stmt (DO_BODY (t));
  
        expand_loop_continue_here ();
        cond = expand_cond (cond);
!       emit_line_note (input_filename, lineno);
        expand_exit_loop_if_false (0, cond);
        expand_end_loop ();
      }
--- 481,505 ----
    else if (integer_nonzerop (cond))
      {
        emit_nop ();
!       emit_line_note (input_filename, input_line);
        expand_start_loop (1);
  
        expand_stmt (DO_BODY (t));
  
!       emit_line_note (input_filename, input_line);
        expand_end_loop ();
      }
    else
      {
        emit_nop ();
!       emit_line_note (input_filename, input_line);
        expand_start_loop_continue_elsewhere (1);
  
        expand_stmt (DO_BODY (t));
  
        expand_loop_continue_here ();
        cond = expand_cond (cond);
!       emit_line_note (input_filename, input_line);
        expand_exit_loop_if_false (0, cond);
        expand_end_loop ();
      }
*************** genrtl_return_stmt (stmt)
*** 524,530 ****
  
    expr = RETURN_STMT_EXPR (stmt);
  
!   emit_line_note (input_filename, lineno);
    if (!expr)
      expand_null_return ();
    else
--- 524,530 ----
  
    expr = RETURN_STMT_EXPR (stmt);
  
!   emit_line_note (input_filename, input_line);
    if (!expr)
      expand_null_return ();
    else
*************** genrtl_for_stmt (t)
*** 552,558 ****
  
    /* Expand the initialization.  */
    emit_nop ();
!   emit_line_note (input_filename, lineno);
    if (FOR_EXPR (t))
      expand_start_loop_continue_elsewhere (1); 
    else
--- 552,558 ----
  
    /* Expand the initialization.  */
    emit_nop ();
!   emit_line_note (input_filename, input_line);
    if (FOR_EXPR (t))
      expand_start_loop_continue_elsewhere (1); 
    else
*************** genrtl_for_stmt (t)
*** 562,574 ****
    /* Save the filename and line number so that we expand the FOR_EXPR
       we can reset them back to the saved values.  */
    saved_filename = input_filename;
!   saved_lineno = lineno;
  
    /* Expand the condition.  */
    if (cond && !integer_nonzerop (cond))
      {
        cond = expand_cond (cond);
!       emit_line_note (input_filename, lineno);
        expand_exit_loop_top_cond (0, cond);
        genrtl_do_pushlevel ();
      }
--- 562,574 ----
    /* Save the filename and line number so that we expand the FOR_EXPR
       we can reset them back to the saved values.  */
    saved_filename = input_filename;
!   saved_lineno = input_line;
  
    /* Expand the condition.  */
    if (cond && !integer_nonzerop (cond))
      {
        cond = expand_cond (cond);
!       emit_line_note (input_filename, input_line);
        expand_exit_loop_top_cond (0, cond);
        genrtl_do_pushlevel ();
      }
*************** genrtl_for_stmt (t)
*** 578,585 ****
  
    /* Expand the increment expression.  */
    input_filename = saved_filename;
!   lineno = saved_lineno;
!   emit_line_note (input_filename, lineno);
    if (FOR_EXPR (t))
      {
        expand_loop_continue_here ();
--- 578,585 ----
  
    /* Expand the increment expression.  */
    input_filename = saved_filename;
!   input_line = saved_lineno;
!   emit_line_note (input_filename, input_line);
    if (FOR_EXPR (t))
      {
        expand_loop_continue_here ();
*************** build_break_stmt ()
*** 601,607 ****
  void
  genrtl_break_stmt ()
  {
!   emit_line_note (input_filename, lineno);
    if ( ! expand_exit_something ())
      error ("break statement not within loop or switch");
  }
--- 601,607 ----
  void
  genrtl_break_stmt ()
  {
!   emit_line_note (input_filename, input_line);
    if ( ! expand_exit_something ())
      error ("break statement not within loop or switch");
  }
*************** build_continue_stmt ()
*** 619,625 ****
  void
  genrtl_continue_stmt ()
  {
!   emit_line_note (input_filename, lineno);
    if (! expand_continue_loop (0))
      error ("continue statement not within a loop");   
  }
--- 619,625 ----
  void
  genrtl_continue_stmt ()
  {
!   emit_line_note (input_filename, input_line);
    if (! expand_continue_loop (0))
      error ("continue statement not within a loop");   
  }
*************** genrtl_switch_stmt (t)
*** 685,691 ****
         crash.  */
      cond = boolean_false_node;
  
!   emit_line_note (input_filename, lineno);
    expand_start_case (1, cond, TREE_TYPE (cond), "switch statement");
    expand_unreachable_stmt (SWITCH_BODY (t), warn_notreached);
    expand_end_case_type (cond, SWITCH_TYPE (t));
--- 685,691 ----
         crash.  */
      cond = boolean_false_node;
  
!   emit_line_note (input_filename, input_line);
    expand_start_case (1, cond, TREE_TYPE (cond), "switch statement");
    expand_unreachable_stmt (SWITCH_BODY (t), warn_notreached);
    expand_end_case_type (cond, SWITCH_TYPE (t));
*************** genrtl_asm_stmt (cv_qualifier, string, o
*** 768,780 ****
        cv_qualifier = NULL_TREE;
      }
  
!   emit_line_note (input_filename, lineno);
    if (asm_input_p)
      expand_asm (string, cv_qualifier != NULL_TREE);
    else
      c_expand_asm_operands (string, output_operands, input_operands, 
  			   clobbers, cv_qualifier != NULL_TREE,
! 			   input_filename, lineno);
  }
  
  /* Generate the RTL for a CLEANUP_STMT.  */
--- 768,780 ----
        cv_qualifier = NULL_TREE;
      }
  
!   emit_line_note (input_filename, input_line);
    if (asm_input_p)
      expand_asm (string, cv_qualifier != NULL_TREE);
    else
      c_expand_asm_operands (string, output_operands, input_operands, 
  			   clobbers, cv_qualifier != NULL_TREE,
! 			   input_filename, input_line);
  }
  
  /* Generate the RTL for a CLEANUP_STMT.  */
*************** prep_stmt (t)
*** 796,802 ****
       tree t;
  {
    if (!STMT_LINENO_FOR_FN_P (t))
!     lineno = STMT_LINENO (t);
    current_stmt_tree ()->stmts_are_full_exprs_p = STMT_IS_FULL_EXPR_P (t);
  }
  
--- 796,802 ----
       tree t;
  {
    if (!STMT_LINENO_FOR_FN_P (t))
!     input_line = STMT_LINENO (t);
    current_stmt_tree ()->stmts_are_full_exprs_p = STMT_IS_FULL_EXPR_P (t);
  }
  
*************** static tree
*** 951,961 ****
  find_reachable_label (exp)
       tree exp;
  {
!   int line = lineno;
    const char *file = input_filename;
    tree ret = walk_tree (&exp, find_reachable_label_1, NULL, NULL);
    input_filename = file;
!   lineno = line;
    return ret;
  }
  
--- 951,961 ----
  find_reachable_label (exp)
       tree exp;
  {
!   int line = input_line;
    const char *file = input_filename;
    tree ret = walk_tree (&exp, find_reachable_label_1, NULL, NULL);
    input_filename = file;
!   input_line = line;
    return ret;
  }
  
*************** expand_unreachable_stmt (t, warn)
*** 1025,1031 ****
  	  case IF_STMT:
  	  case RETURN_STMT:
  	    if (!STMT_LINENO_FOR_FN_P (t))
! 	      lineno = STMT_LINENO (t);
  	    warning("will never be executed");
  	    warn = false;
  	    break;
--- 1025,1031 ----
  	  case IF_STMT:
  	  case RETURN_STMT:
  	    if (!STMT_LINENO_FOR_FN_P (t))
! 	      input_line = STMT_LINENO (t);
  	    warning("will never be executed");
  	    warn = false;
  	    break;
Index: coverage.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
retrieving revision 1.3
diff -c -3 -p -r1.3 coverage.c
*** coverage.c	24 Apr 2003 09:46:16 -0000	1.3
--- coverage.c	30 Apr 2003 16:22:05 -0000
*************** create_coverage ()
*** 800,806 ****
    current_function_decl = ctor;
    DECL_INITIAL (ctor) = error_mark_node;
    make_decl_rtl (ctor, NULL);
!   init_function_start (ctor, input_filename, lineno);
    (*lang_hooks.decls.pushlevel) (0);
    expand_function_start (ctor, 0);
    cfun->arc_profile = 0;
--- 800,806 ----
    current_function_decl = ctor;
    DECL_INITIAL (ctor) = error_mark_node;
    make_decl_rtl (ctor, NULL);
!   init_function_start (ctor, input_filename, input_line);
    (*lang_hooks.decls.pushlevel) (0);
    expand_function_start (ctor, 0);
    cfun->arc_profile = 0;
*************** create_coverage ()
*** 810,816 ****
    emit_library_call (gcov_init_libfunc, LCT_NORMAL, VOIDmode, 1,
  		     gcov_info_address, Pmode);
  
!   expand_function_end (input_filename, lineno, 0);
    (*lang_hooks.decls.poplevel) (1, 0, 1);
  
    /* Since ctor isn't in the list of globals, it would never be emitted
--- 810,816 ----
    emit_library_call (gcov_init_libfunc, LCT_NORMAL, VOIDmode, 1,
  		     gcov_info_address, Pmode);
  
!   expand_function_end (input_filename, input_line, 0);
    (*lang_hooks.decls.poplevel) (1, 0, 1);
  
    /* Since ctor isn't in the list of globals, it would never be emitted
Index: diagnostic.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/diagnostic.c,v
retrieving revision 1.104
diff -c -3 -p -r1.104 diagnostic.c
*** diagnostic.c	30 Apr 2003 12:54:28 -0000	1.104
--- diagnostic.c	30 Apr 2003 16:22:08 -0000
***************
*** 1,5 ****
  /* Language-independent diagnostic subroutines for the GNU Compiler Collection
!    Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
     Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
  
  This file is part of GCC.
--- 1,5 ----
  /* Language-independent diagnostic subroutines for the GNU Compiler Collection
!    Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
     Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
  
  This file is part of GCC.
*************** pedwarn VPARAMS ((const char *msgid, ...
*** 961,967 ****
    VA_OPEN (ap, msgid);
    VA_FIXEDARG (ap, const char *, msgid);
  
!   diagnostic_set_info (&diagnostic, _(msgid), &ap, input_filename, lineno,
                         pedantic_error_kind ());
    report_diagnostic (&diagnostic);
    VA_CLOSE (ap);
--- 961,967 ----
    VA_OPEN (ap, msgid);
    VA_FIXEDARG (ap, const char *, msgid);
  
!   diagnostic_set_info (&diagnostic, _(msgid), &ap, input_filename, input_line,
                         pedantic_error_kind ());
    report_diagnostic (&diagnostic);
    VA_CLOSE (ap);
*************** sorry VPARAMS ((const char *msgid, ...))
*** 1019,1025 ****
  
    ++sorrycount;
    diagnostic_set_info (&diagnostic, _(msgid), &ap,
!                        input_filename, lineno, DK_SORRY);
  
    output_set_prefix
      (&global_dc->buffer, diagnostic_build_prefix (&diagnostic));
--- 1019,1025 ----
  
    ++sorrycount;
    diagnostic_set_info (&diagnostic, _(msgid), &ap,
!                        input_filename, input_line, DK_SORRY);
  
    output_set_prefix
      (&global_dc->buffer, diagnostic_build_prefix (&diagnostic));
*************** error VPARAMS ((const char *msgid, ...))
*** 1136,1142 ****
    VA_OPEN (ap, msgid);
    VA_FIXEDARG (ap, const char *, msgid);
  
!   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, lineno,
                         DK_ERROR);
    report_diagnostic (&diagnostic);
    VA_CLOSE (ap);
--- 1136,1142 ----
    VA_OPEN (ap, msgid);
    VA_FIXEDARG (ap, const char *, msgid);
  
!   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, input_line,
                         DK_ERROR);
    report_diagnostic (&diagnostic);
    VA_CLOSE (ap);
*************** fatal_error VPARAMS ((const char *msgid,
*** 1153,1159 ****
    VA_OPEN (ap, msgid);
    VA_FIXEDARG (ap, const char *, msgid);
  
!   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, lineno,
                         DK_FATAL);
    report_diagnostic (&diagnostic);
    VA_CLOSE (ap);
--- 1153,1159 ----
    VA_OPEN (ap, msgid);
    VA_FIXEDARG (ap, const char *, msgid);
  
!   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, input_line,
                         DK_FATAL);
    report_diagnostic (&diagnostic);
    VA_CLOSE (ap);
*************** internal_error VPARAMS ((const char *msg
*** 1177,1183 ****
    if (errorcount > 0 || sorrycount > 0)
      {
        fnotice (stderr, "%s:%d: confused by earlier errors, bailing out\n",
! 	       input_filename, lineno);
        exit (FATAL_EXIT_CODE);
      }
  #endif
--- 1177,1183 ----
    if (errorcount > 0 || sorrycount > 0)
      {
        fnotice (stderr, "%s:%d: confused by earlier errors, bailing out\n",
! 	       input_filename, input_line);
        exit (FATAL_EXIT_CODE);
      }
  #endif
*************** internal_error VPARAMS ((const char *msg
*** 1185,1191 ****
    if (global_dc->internal_error != 0)
      (*global_dc->internal_error) (_(msgid), &ap);
  
!   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, lineno,
                         DK_ICE);
    report_diagnostic (&diagnostic);
    VA_CLOSE (ap);
--- 1185,1191 ----
    if (global_dc->internal_error != 0)
      (*global_dc->internal_error) (_(msgid), &ap);
  
!   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, input_line,
                         DK_ICE);
    report_diagnostic (&diagnostic);
    VA_CLOSE (ap);
*************** warning VPARAMS ((const char *msgid, ...
*** 1236,1242 ****
    VA_OPEN (ap, msgid);
    VA_FIXEDARG (ap, const char *, msgid);
  
!   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, lineno,
                         DK_WARNING);
    report_diagnostic (&diagnostic);
    VA_CLOSE (ap);
--- 1236,1242 ----
    VA_OPEN (ap, msgid);
    VA_FIXEDARG (ap, const char *, msgid);
  
!   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, input_line,
                         DK_WARNING);
    report_diagnostic (&diagnostic);
    VA_CLOSE (ap);
*************** diagnostic_report_current_module (contex
*** 1382,1391 ****
        for (p = input_file_stack->next; p; p = p->next)
  	if (p == input_file_stack->next)
  	  output_verbatim (&context->buffer,
!                            "In file included from %s:%d", p->name, p->line);
  	else
  	  output_verbatim (&context->buffer,
!                            ",\n                 from %s:%d", p->name, p->line);
        output_verbatim (&context->buffer, ":\n");
        diagnostic_set_last_module (context);
      }
--- 1382,1393 ----
        for (p = input_file_stack->next; p; p = p->next)
  	if (p == input_file_stack->next)
  	  output_verbatim (&context->buffer,
!                            "In file included from %s:%d",
! 			   p->location.file, p->location.line);
  	else
  	  output_verbatim (&context->buffer,
!                            ",\n                 from %s:%d",
! 			   p->location.file, p->location.line);
        output_verbatim (&context->buffer, ":\n");
        diagnostic_set_last_module (context);
      }
*************** inform VPARAMS ((const char *msgid, ...)
*** 1416,1422 ****
    VA_OPEN (ap, msgid);
    VA_FIXEDARG (ap, const char *, msgid);
  
!   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, lineno,
                         DK_NOTE);
    report_diagnostic (&diagnostic);
    VA_CLOSE (ap);
--- 1418,1424 ----
    VA_OPEN (ap, msgid);
    VA_FIXEDARG (ap, const char *, msgid);
  
!   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, input_line,
                         DK_NOTE);
    report_diagnostic (&diagnostic);
    VA_CLOSE (ap);
Index: diagnostic.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/diagnostic.h,v
retrieving revision 1.53
diff -c -3 -p -r1.53 diagnostic.h
*** diagnostic.h	30 Apr 2003 12:54:29 -0000	1.53
--- diagnostic.h	30 Apr 2003 16:22:09 -0000
*************** Software Foundation, 59 Temple Place - S
*** 23,29 ****
  #define GCC_DIAGNOSTIC_H
  
  #include "obstack.h"
! #include "location.h"
  
  /* The type of a text to be formatted according a format specification
     along with a list of things.  */
--- 23,29 ----
  #define GCC_DIAGNOSTIC_H
  
  #include "obstack.h"
! #include "input.h"
  
  /* The type of a text to be formatted according a format specification
     along with a list of things.  */
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.423
diff -c -3 -p -r1.423 dwarf2out.c
*** dwarf2out.c	29 Apr 2003 20:42:55 -0000	1.423
--- dwarf2out.c	30 Apr 2003 16:22:36 -0000
*************** dwarf2out_undef (lineno, buffer)
*** 12761,12768 ****
  /* Set up for Dwarf output at the start of compilation.  */
  
  static void
! dwarf2out_init (input_filename)
!      const char *input_filename ATTRIBUTE_UNUSED;
  {
    init_file_table ();
  
--- 12761,12768 ----
  /* Set up for Dwarf output at the start of compilation.  */
  
  static void
! dwarf2out_init (filename)
!      const char *filename ATTRIBUTE_UNUSED;
  {
    init_file_table ();
  
*************** prune_unused_types ()
*** 13068,13083 ****
     and generate the DWARF-2 debugging info.  */
  
  static void
! dwarf2out_finish (input_filename)
!      const char *input_filename;
  {
    limbo_die_node *node, *next_node;
    dw_die_ref die = 0;
  
    /* Add the name for the main input file now.  We delayed this from
       dwarf2out_init to avoid complications with PCH.  */
!   add_name_attribute (comp_unit_die, input_filename);
!   if (input_filename[0] != DIR_SEPARATOR)
      add_comp_dir_attribute (comp_unit_die);
    else if (get_AT (comp_unit_die, DW_AT_comp_dir) == NULL)
      {
--- 13068,13083 ----
     and generate the DWARF-2 debugging info.  */
  
  static void
! dwarf2out_finish (filename)
!      const char *filename;
  {
    limbo_die_node *node, *next_node;
    dw_die_ref die = 0;
  
    /* Add the name for the main input file now.  We delayed this from
       dwarf2out_init to avoid complications with PCH.  */
!   add_name_attribute (comp_unit_die, filename);
!   if (filename[0] != DIR_SEPARATOR)
      add_comp_dir_attribute (comp_unit_die);
    else if (get_AT (comp_unit_die, DW_AT_comp_dir) == NULL)
      {
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.530
diff -c -3 -p -r1.530 expr.c
*** expr.c	30 Apr 2003 00:49:01 -0000	1.530
--- expr.c	30 Apr 2003 16:22:59 -0000
*************** expand_expr (exp, target, tmode, modifie
*** 6933,6947 ****
        {
  	rtx to_return;
  	const char *saved_input_filename = input_filename;
! 	int saved_lineno = lineno;
  	input_filename = EXPR_WFL_FILENAME (exp);
! 	lineno = EXPR_WFL_LINENO (exp);
  	if (EXPR_WFL_EMIT_LINE_NOTE (exp))
! 	  emit_line_note (input_filename, lineno);
  	/* Possibly avoid switching back and forth here.  */
  	to_return = expand_expr (EXPR_WFL_NODE (exp), target, tmode, modifier);
  	input_filename = saved_input_filename;
! 	lineno = saved_lineno;
  	return to_return;
        }
  
--- 6933,6947 ----
        {
  	rtx to_return;
  	const char *saved_input_filename = input_filename;
! 	int saved_lineno = input_line;
  	input_filename = EXPR_WFL_FILENAME (exp);
! 	input_line = EXPR_WFL_LINENO (exp);
  	if (EXPR_WFL_EMIT_LINE_NOTE (exp))
! 	  emit_line_note (input_filename, input_line);
  	/* Possibly avoid switching back and forth here.  */
  	to_return = expand_expr (EXPR_WFL_NODE (exp), target, tmode, modifier);
  	input_filename = saved_input_filename;
! 	input_line = saved_lineno;
  	return to_return;
        }
  
Index: gcc.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcc.h,v
retrieving revision 1.13
diff -c -3 -p -r1.13 gcc.h
*** gcc.h	10 Mar 2003 23:41:37 -0000	1.13
--- gcc.h	30 Apr 2003 16:22:59 -0000
***************
*** 1,5 ****
  /* Header file for modules that link with gcc.c
!    Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
  
  This file is part of GCC.
  
--- 1,5 ----
  /* Header file for modules that link with gcc.c
!    Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
  
  This file is part of GCC.
  
*************** struct spec_function
*** 57,64 ****
  extern int do_spec PARAMS ((const char *));
  extern void record_temp_file PARAMS ((const char *, int, int));
  extern void fancy_abort PARAMS ((void)) ATTRIBUTE_NORETURN;
- extern const char *input_filename;
- extern size_t input_filename_length;
  extern void fatal PARAMS ((const char *, ...))
       ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
  extern void error PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1;
--- 57,62 ----
Index: input.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/input.h,v
retrieving revision 1.8
diff -c -3 -p -r1.8 input.h
*** input.h	23 May 2002 12:04:45 -0000	1.8
--- input.h	30 Apr 2003 16:23:00 -0000
***************
*** 1,6 ****
  /* Declarations for variables relating to reading the source file.
     Used by parsers, lexical analyzers, and error message routines.
!    Copyright (C) 1993, 1997, 1998, 2000 Free Software Foundation, Inc.
  
  This file is part of GCC.
  
--- 1,6 ----
  /* Declarations for variables relating to reading the source file.
     Used by parsers, lexical analyzers, and error message routines.
!    Copyright (C) 1993, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
  
  This file is part of GCC.
  
*************** along with GCC; see the file COPYING.  I
*** 19,42 ****
  Software Foundation, 59 Temple Place - Suite 330, Boston, MA
  02111-1307, USA.  */
  
! /* Source file current line is coming from.  */
! extern const char *input_filename;
  
! /* Top-level source file.  */
! extern const char *main_input_filename;
  
! /* Line number in current source file.  */
! extern int lineno;
  
! /* Stream for reading from input file.  */
! extern FILE *finput;
  
! struct file_stack
!   {
!     const char *name;
!     struct file_stack *next;
!     int line;
!   };
  
  /* Stack of currently pending input files.
     The line member is not accurate for the innermost file on the stack.  */
--- 19,50 ----
  Software Foundation, 59 Temple Place - Suite 330, Boston, MA
  02111-1307, USA.  */
  
! #ifndef GCC_INPUT_H
! #define GCC_INPUT_H
  
! /* The data structure used to record a location in a translation unit.  */
! struct location_s GTY (())
! {
!   /* The name of the source file involved.  */     
!   const char *file;
! 
!   /* The line-location in the source file.  */
!   int line;
! };
! typedef struct location_s location_t;
  
! struct file_stack
! {
!   struct file_stack *next;
!   location_t location;
! };
  
! /* Top-level source file.  */
! extern const char *main_input_filename;
  
! extern location_t input_location;
! #define input_line (input_location.line)
! #define input_filename (input_location.file)
  
  /* Stack of currently pending input files.
     The line member is not accurate for the innermost file on the stack.  */
*************** extern int input_file_stack_tick;
*** 47,49 ****
--- 55,59 ----
  
  extern void push_srcloc PARAMS ((const char *name, int line));
  extern void pop_srcloc PARAMS ((void));
+ 
+ #endif
Index: integrate.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/integrate.c,v
retrieving revision 1.217
diff -c -3 -p -r1.217 integrate.c
*** integrate.c	18 Apr 2003 22:11:57 -0000	1.217
--- integrate.c	30 Apr 2003 16:23:07 -0000
*************** expand_inline_function (fndecl, parms, t
*** 1307,1313 ****
    if (flag_test_coverage)
      emit_note (0, NOTE_INSN_REPEATED_LINE_NUMBER);
  
!   emit_line_note (input_filename, lineno);
  
    /* If the function returns a BLKmode object in a register, copy it
       out of the temp register into a BLKmode memory object.  */
--- 1307,1313 ----
    if (flag_test_coverage)
      emit_note (0, NOTE_INSN_REPEATED_LINE_NUMBER);
  
!   emit_line_note (input_filename, input_line);
  
    /* If the function returns a BLKmode object in a register, copy it
       out of the temp register into a BLKmode memory object.  */
*************** output_inline_function (fndecl)
*** 3041,3047 ****
    /* Make sure warnings emitted by the optimizers (e.g. control reaches
       end of non-void function) is not wildly incorrect.  */
    input_filename = DECL_SOURCE_FILE (fndecl);
!   lineno = DECL_SOURCE_LINE (fndecl);
  
    /* Compile this function all the way down to assembly code.  As a
       side effect this destroys the saved RTL representation, but
--- 3041,3047 ----
    /* Make sure warnings emitted by the optimizers (e.g. control reaches
       end of non-void function) is not wildly incorrect.  */
    input_filename = DECL_SOURCE_FILE (fndecl);
!   input_line = DECL_SOURCE_LINE (fndecl);
  
    /* Compile this function all the way down to assembly code.  As a
       side effect this destroys the saved RTL representation, but
Index: location.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/location.h,v
retrieving revision 1.1
diff -c -3 -p -r1.1 location.h
*** location.h	10 Jul 2002 10:36:27 -0000	1.1
--- location.h	30 Apr 2003 16:23:07 -0000
***************
*** 1,38 ****
- /* Definition of location data type used in various part of GCC
-    Copyright (C) 2002 Free Software Foundation, Inc.
-    Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
- 
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
- 
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
- 
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- 
-  In other words, you are welcome to use, share and improve this program.
-  You are forbidden to forbid anyone else to use, share and improve
-  what you give them.   Help stamp out software-hoarding!  */
- 
- #ifndef GCC_LOCATION_H
- #define GCC_LOCATION_H
- 
- /* The data structure used to record a location in a translation unit.  */
- struct location_s GTY (())
- {
-   /* The name of the source file involved.  */     
-   const char *file;
- 
-   /* The line-location in the source file.  */
-   int line;
- };
- typedef struct location_s location_t;
- 
- #endif
- 
--- 0 ----
Index: rtl-error.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl-error.c,v
retrieving revision 1.7
diff -c -3 -p -r1.7 rtl-error.c
*** rtl-error.c	16 Dec 2002 18:19:53 -0000	1.7
--- rtl-error.c	30 Apr 2003 16:23:08 -0000
***************
*** 1,5 ****
  /* RTL specific diagnostic subroutines for the GNU C compiler
!    Copyright (C) 2001, 2002 Free Software Foundation, Inc.
     Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
  
  This file is part of GCC.
--- 1,5 ----
  /* RTL specific diagnostic subroutines for the GNU C compiler
!    Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
     Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
  
  This file is part of GCC.
*************** file_and_line_for_asm (insn, pfile, plin
*** 69,75 ****
    else
      {
        *pfile = input_filename;
!       *pline = lineno;
      }
  }
  
--- 69,75 ----
    else
      {
        *pfile = input_filename;
!       *pline = input_line;
      }
  }
  
Index: scan.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/scan.h,v
retrieving revision 1.17
diff -c -3 -p -r1.17 scan.h
*** scan.h	28 Jan 2003 23:26:26 -0000	1.17
--- scan.h	30 Apr 2003 16:23:08 -0000
***************
*** 1,5 ****
  /* scan.h - Utility declarations for scan-decls and fix-header programs.
!    Copyright (C) 1993, 1998, 1999 Free Software Foundation, Inc.
  
  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the
--- 1,5 ----
  /* scan.h - Utility declarations for scan-decls and fix-header programs.
!    Copyright (C) 1993, 1998, 1999, 2003 Free Software Foundation, Inc.
  
  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the
*************** struct fn_decl
*** 52,58 ****
  
  struct cpp_token;
  
- extern int lineno;
  extern void sstring_append _PARAMS((sstring *, sstring *));
  extern void make_sstring_space _PARAMS((sstring *, int));
  extern int skip_spaces _PARAMS((FILE *, int));
--- 52,57 ----
*************** extern int get_token _PARAMS ((FILE *, s
*** 78,81 ****
  extern int source_lineno;
  extern sstring source_filename;
  /* Current physical line number */
- extern int lineno;
--- 77,79 ----
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.747
diff -c -3 -p -r1.747 toplev.c
*** toplev.c	29 Apr 2003 14:16:40 -0000	1.747
--- toplev.c	30 Apr 2003 16:23:20 -0000
*************** const char *progname;
*** 149,168 ****
  int save_argc;
  char **save_argv;
  
- /* Name of current original source file (what was input to cpp).
-    This comes from each #-command in the actual input.  */
- 
- const char *input_filename;
- 
  /* Name of top-level original source file (what was input to cpp).
     This comes from the #-command at the beginning of the actual input.
     If there isn't any there, then this is the cc1 input file name.  */
  
  const char *main_input_filename;
  
! /* Current line number in real source file.  */
  
! int lineno;
  
  /* Nonzero if it is unsafe to create any new pseudo registers.  */
  int no_new_pseudos;
--- 149,163 ----
  int save_argc;
  char **save_argv;
  
  /* Name of top-level original source file (what was input to cpp).
     This comes from the #-command at the beginning of the actual input.
     If there isn't any there, then this is the cc1 input file name.  */
  
  const char *main_input_filename;
  
! /* Current position in real source file.  */
  
! location_t input_location;
  
  /* Nonzero if it is unsafe to create any new pseudo registers.  */
  int no_new_pseudos;
*************** push_srcloc (file, line)
*** 2147,2160 ****
    struct file_stack *fs;
  
    if (input_file_stack)
!     {
!       input_file_stack->name = input_filename;
!       input_file_stack->line = lineno;
!     }
  
    fs = (struct file_stack *) xmalloc (sizeof (struct file_stack));
!   fs->name = input_filename = file;
!   fs->line = lineno = line;
    fs->next = input_file_stack;
    input_file_stack = fs;
    input_file_stack_tick++;
--- 2142,2153 ----
    struct file_stack *fs;
  
    if (input_file_stack)
!     input_file_stack->location = input_location;
  
    fs = (struct file_stack *) xmalloc (sizeof (struct file_stack));
!   input_filename = file;
!   input_line = line;
!   fs->location = input_location;
    fs->next = input_file_stack;
    input_file_stack = fs;
    input_file_stack_tick++;
*************** pop_srcloc ()
*** 2175,2188 ****
    input_file_stack_tick++;
  
    if (input_file_stack)
!     {
!       input_filename = input_file_stack->name;
!       lineno = input_file_stack->line;
!     }
    else
      {
        input_filename = NULL;
!       lineno = 0;
      }
  }
  
--- 2168,2178 ----
    input_file_stack_tick++;
  
    if (input_file_stack)
!     input_location = input_file_stack->location;
    else
      {
        input_filename = NULL;
!       input_line = 0;
      }
  }
  
Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.55
diff -c -3 -p -r1.55 tree-inline.c
*** tree-inline.c	29 Apr 2003 23:32:43 -0000	1.55
--- tree-inline.c	30 Apr 2003 16:23:24 -0000
***************
*** 1,5 ****
  /* Control and data flow functions for trees.
!    Copyright 2001, 2002 Free Software Foundation, Inc.
     Contributed by Alexandre Oliva <aoliva@redhat.com>
  
  This file is part of GCC.
--- 1,5 ----
  /* Control and data flow functions for trees.
!    Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
     Contributed by Alexandre Oliva <aoliva@redhat.com>
  
  This file is part of GCC.
*************** static tree
*** 900,909 ****
  find_alloca_call (exp)
       tree exp;
  {
!   int line = lineno;
    const char *file = input_filename;
    tree ret = walk_tree (&exp, find_alloca_call_1, NULL, NULL);
!   lineno = line;
    input_filename = file;
    return ret;
  }
--- 900,909 ----
  find_alloca_call (exp)
       tree exp;
  {
!   int line = input_line;
    const char *file = input_filename;
    tree ret = walk_tree (&exp, find_alloca_call_1, NULL, NULL);
!   input_line = line;
    input_filename = file;
    return ret;
  }
*************** static tree
*** 931,940 ****
  find_builtin_longjmp_call (exp)
       tree exp;
  {
!   int line = lineno;
    const char *file = input_filename;
    tree ret = walk_tree (&exp, find_builtin_longjmp_call_1, NULL, NULL);
!   lineno = line;
    input_filename = file;
    return ret;
  }
--- 931,940 ----
  find_builtin_longjmp_call (exp)
       tree exp;
  {
!   int line = input_line;
    const char *file = input_filename;
    tree ret = walk_tree (&exp, find_builtin_longjmp_call_1, NULL, NULL);
!   input_line = line;
    input_filename = file;
    return ret;
  }
*************** walk_tree (tp, func, data, htab_)
*** 1646,1652 ****
        /* Set lineno here so we get the right instantiation context
  	 if we call instantiate_decl from inlinable_function_p.  */
        if (STATEMENT_CODE_P (code) && !STMT_LINENO_FOR_FN_P (*tp))
! 	lineno = STMT_LINENO (*tp);
  #endif /* not INLINER_FOR_JAVA */
  
        /* Walk over all the sub-trees of this operand.  */
--- 1646,1652 ----
        /* Set lineno here so we get the right instantiation context
  	 if we call instantiate_decl from inlinable_function_p.  */
        if (STATEMENT_CODE_P (code) && !STMT_LINENO_FOR_FN_P (*tp))
! 	input_line = STMT_LINENO (*tp);
  #endif /* not INLINER_FOR_JAVA */
  
        /* Walk over all the sub-trees of this operand.  */
Index: tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.c,v
retrieving revision 1.300
diff -c -3 -p -r1.300 tree.c
*** tree.c	29 Apr 2003 22:38:09 -0000	1.300
--- tree.c	30 Apr 2003 16:23:33 -0000
***************
*** 1,6 ****
  /* Language-independent node constructors for parse phase of GNU compiler.
     Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
!    1999, 2000, 2001, 2002 Free Software Foundation, Inc.
  
  This file is part of GCC.
  
--- 1,6 ----
  /* Language-independent node constructors for parse phase of GNU compiler.
     Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
!    1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
  
  This file is part of GCC.
  
*************** make_node (code)
*** 308,314 ****
  	DECL_ALIGN (t) = 1;
        DECL_USER_ALIGN (t) = 0;
        DECL_IN_SYSTEM_HEADER (t) = in_system_header;
!       DECL_SOURCE_LINE (t) = lineno;
        DECL_SOURCE_FILE (t) =
  	(input_filename) ? input_filename : "<built-in>";
        DECL_UID (t) = next_decl_uid++;
--- 308,314 ----
  	DECL_ALIGN (t) = 1;
        DECL_USER_ALIGN (t) = 0;
        DECL_IN_SYSTEM_HEADER (t) = in_system_header;
!       DECL_SOURCE_LINE (t) = input_line;
        DECL_SOURCE_FILE (t) =
  	(input_filename) ? input_filename : "<built-in>";
        DECL_UID (t) = next_decl_uid++;
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.397
diff -c -3 -p -r1.397 tree.h
*** tree.h	29 Apr 2003 17:10:48 -0000	1.397
--- tree.h	30 Apr 2003 16:23:42 -0000
*************** Software Foundation, 59 Temple Place - S
*** 24,30 ****
  
  #include "machmode.h"
  #include "version.h"
! #include "location.h"
  
  /* Codes of tree nodes */
  
--- 24,30 ----
  
  #include "machmode.h"
  #include "version.h"
! #include "input.h"
  
  /* Codes of tree nodes */
  
*************** extern const char *function_cannot_inlin
*** 2787,2799 ****
  extern int real_zerop PARAMS ((tree));
  
  /* Declare commonly used variables for tree structure.  */
- 
- /* Points to the name of the input file from which the current input
-    being parsed originally came (before it went into cpp).  */
- extern const char *input_filename;
- 
- /* Current line number in input file.  */
- extern int lineno;
  
  /* Nonzero means lvalues are limited to those valid in pedantic ANSI C.
     Zero means allow extended lvalues.  */
--- 2787,2792 ----
Index: ada/gigi.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/gigi.h,v
retrieving revision 1.15
diff -c -3 -p -r1.15 gigi.h
*** ada/gigi.h	13 Apr 2003 01:45:28 -0000	1.15
--- ada/gigi.h	30 Apr 2003 16:23:46 -0000
***************
*** 7,13 ****
   *                              C Header File                               *
   *                                                                          *
   *                                                                          *
!  *          Copyright (C) 1992-2002 Free Software Foundation, Inc.          *
   *                                                                          *
   * GNAT is free software;  you can  redistribute it  and/or modify it under *
   * terms of the  GNU General Public License as published  by the Free Soft- *
--- 7,13 ----
   *                              C Header File                               *
   *                                                                          *
   *                                                                          *
!  *          Copyright (C) 1992-2003 Free Software Foundation, Inc.          *
   *                                                                          *
   * GNAT is free software;  you can  redistribute it  and/or modify it under *
   * terms of the  GNU General Public License as published  by the Free Soft- *
*************** extern tree gnat_to_gnu		PARAMS ((Node_I
*** 192,200 ****
  
  extern void process_type	PARAMS ((Entity_Id));
  
! /* Determine the input_filename and the lineno from the source location
     (Sloc) of GNAT_NODE node.  Set the global variable input_filename and
!    lineno.  If WRITE_NOTE_P is true, emit a line number note. */
  extern void set_lineno		PARAMS ((Node_Id, int));
  
  /* Post an error message.  MSG is the error message, properly annotated.
--- 192,200 ----
  
  extern void process_type	PARAMS ((Entity_Id));
  
! /* Determine the input_filename and the input_line from the source location
     (Sloc) of GNAT_NODE node.  Set the global variable input_filename and
!    input_line.  If WRITE_NOTE_P is true, emit a line number note. */
  extern void set_lineno		PARAMS ((Node_Id, int));
  
  /* Post an error message.  MSG is the error message, properly annotated.
Index: ada/trans.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/trans.c,v
retrieving revision 1.25
diff -c -3 -p -r1.25 trans.c
*** ada/trans.c	24 Apr 2003 17:54:19 -0000	1.25
--- ada/trans.c	30 Apr 2003 16:24:02 -0000
***************
*** 7,13 ****
   *                          C Implementation File                           *
   *                                                                          *
   *                                                                          *
!  *          Copyright (C) 1992-2002, Free Software Foundation, Inc.         *
   *                                                                          *
   * GNAT is free software;  you can  redistribute it  and/or modify it under *
   * terms of the  GNU General Public License as published  by the Free Soft- *
--- 7,13 ----
   *                          C Implementation File                           *
   *                                                                          *
   *                                                                          *
!  *          Copyright (C) 1992-2003, Free Software Foundation, Inc.         *
   *                                                                          *
   * GNAT is free software;  you can  redistribute it  and/or modify it under *
   * terms of the  GNU General Public License as published  by the Free Soft- *
*************** build_unit_elab (gnat_unit, body_p, gnu_
*** 5343,5349 ****
  	tree lhs = TREE_PURPOSE (gnu_elab_list);
  
  	input_filename = DECL_SOURCE_FILE (lhs);
! 	lineno = DECL_SOURCE_LINE (lhs);
  
  	/* If LHS has a padded type, convert it to the unpadded type
  	   so the assignment is done properly.  */
--- 5343,5349 ----
  	tree lhs = TREE_PURPOSE (gnu_elab_list);
  
  	input_filename = DECL_SOURCE_FILE (lhs);
! 	input_line = DECL_SOURCE_LINE (lhs);
  
  	/* If LHS has a padded type, convert it to the unpadded type
  	   so the assignment is done properly.  */
*************** set_lineno (gnat_node, write_note_p)
*** 5414,5420 ****
        (get_identifier
         (Get_Name_String
  	(Reference_Name (Get_Source_File_Index (source_location)))));;
!   lineno = Get_Logical_Line_Number (source_location);
  
    if (write_note_p)
      emit_line_note (input_filename, lineno);
--- 5414,5420 ----
        (get_identifier
         (Get_Name_String
  	(Reference_Name (Get_Source_File_Index (source_location)))));;
!   input_line = Get_Logical_Line_Number (source_location);
  
    if (write_note_p)
      emit_line_note (input_filename, lineno);
Index: ada/utils.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/utils.c,v
retrieving revision 1.25
diff -c -3 -p -r1.25 utils.c
*** ada/utils.c	28 Apr 2003 20:02:28 -0000	1.25
--- ada/utils.c	30 Apr 2003 16:24:10 -0000
***************
*** 7,13 ****
   *                          C Implementation File                           *
   *                                                                          *
   *                                                                          *
!  *          Copyright (C) 1992-2002, Free Software Foundation, Inc.         *
   *                                                                          *
   * GNAT is free software;  you can  redistribute it  and/or modify it under *
   * terms of the  GNU General Public License as published  by the Free Soft- *
--- 7,13 ----
   *                          C Implementation File                           *
   *                                                                          *
   *                                                                          *
!  *          Copyright (C) 1992-2003, Free Software Foundation, Inc.         *
   *                                                                          *
   * GNAT is free software;  you can  redistribute it  and/or modify it under *
   * terms of the  GNU General Public License as published  by the Free Soft- *
*************** pushdecl (decl)
*** 479,485 ****
  void
  gnat_init_decl_processing ()
  {
!   lineno = 0;
  
    /* Make the binding_level structure for global names.  */
    current_function_decl = 0;
--- 479,485 ----
  void
  gnat_init_decl_processing ()
  {
!   input_line = 0;
  
    /* Make the binding_level structure for global names.  */
    current_function_decl = 0;
*************** create_label_decl (label_name)
*** 1663,1669 ****
  
    DECL_CONTEXT (label_decl)     = current_function_decl;
    DECL_MODE (label_decl)        = VOIDmode;
!   DECL_SOURCE_LINE (label_decl) = lineno;
    DECL_SOURCE_FILE (label_decl) = input_filename;
  
    return label_decl;
--- 1663,1669 ----
  
    DECL_CONTEXT (label_decl)     = current_function_decl;
    DECL_MODE (label_decl)        = VOIDmode;
!   DECL_SOURCE_LINE (label_decl) = input_line;
    DECL_SOURCE_FILE (label_decl) = input_filename;
  
    return label_decl;
*************** begin_subprog_body (subprog_decl)
*** 1781,1787 ****
    /* Store back the PARM_DECL nodes. They appear in the right order. */
    DECL_ARGUMENTS (subprog_decl) = getdecls ();
  
!   init_function_start (subprog_decl, input_filename, lineno);
    expand_function_start (subprog_decl, 0);
  
    /* If this function is `main', emit a call to `__main'
--- 1781,1787 ----
    /* Store back the PARM_DECL nodes. They appear in the right order. */
    DECL_ARGUMENTS (subprog_decl) = getdecls ();
  
!   init_function_start (subprog_decl, input_filename, input_line);
    expand_function_start (subprog_decl, 0);
  
    /* If this function is `main', emit a call to `__main'
*************** end_subprog_body ()
*** 1808,1814 ****
    /* Mark the RESULT_DECL as being in this subprogram. */
    DECL_CONTEXT (DECL_RESULT (current_function_decl)) = current_function_decl;
  
!   expand_function_end (input_filename, lineno, 0);
  
    /* If this is a nested function, push a new GC context.  That will keep
       local variables on the stack from being collected while we're doing
--- 1808,1814 ----
    /* Mark the RESULT_DECL as being in this subprogram. */
    DECL_CONTEXT (DECL_RESULT (current_function_decl)) = current_function_decl;
  
!   expand_function_end (input_filename, input_line, 0);
  
    /* If this is a nested function, push a new GC context.  That will keep
       local variables on the stack from being collected while we're doing
Index: ada/utils2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/utils2.c,v
retrieving revision 1.15
diff -c -3 -p -r1.15 utils2.c
*** ada/utils2.c	13 Apr 2003 01:45:28 -0000	1.15
--- ada/utils2.c	30 Apr 2003 16:24:15 -0000
***************
*** 7,13 ****
   *                          C Implementation File                           *
   *                                                                          *
   *                                                                          *
!  *          Copyright (C) 1992-2002, Free Software Foundation, Inc.         *
   *                                                                          *
   * GNAT is free software;  you can  redistribute it  and/or modify it under *
   * terms of the  GNU General Public License as published  by the Free Soft- *
--- 7,13 ----
   *                          C Implementation File                           *
   *                                                                          *
   *                                                                          *
!  *          Copyright (C) 1992-2003, Free Software Foundation, Inc.         *
   *                                                                          *
   * GNAT is free software;  you can  redistribute it  and/or modify it under *
   * terms of the  GNU General Public License as published  by the Free Soft- *
*************** build_call_raise (msg)
*** 1508,1514 ****
      build_call_2_expr (fndecl,
  		       build1 (ADDR_EXPR, build_pointer_type (char_type_node),
  			       filename),
! 		       build_int_2 (lineno, 0));
  }
  
  /* Return a CONSTRUCTOR of TYPE whose list is LIST.  */
--- 1508,1514 ----
      build_call_2_expr (fndecl,
  		       build1 (ADDR_EXPR, build_pointer_type (char_type_node),
  			       filename),
! 		       build_int_2 (input_line, 0));
  }
  
  /* Return a CONSTRUCTOR of TYPE whose list is LIST.  */
Index: cp/class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/class.c,v
retrieving revision 1.535
diff -c -3 -p -r1.535 class.c
*** cp/class.c	29 Apr 2003 21:28:38 -0000	1.535
--- cp/class.c	30 Apr 2003 16:24:35 -0000
*************** tree
*** 5252,5258 ****
  finish_struct (tree t, tree attributes)
  {
    const char *saved_filename = input_filename;
!   int saved_lineno = lineno;
  
    /* Now that we've got all the field declarations, reverse everything
       as necessary.  */
--- 5252,5258 ----
  finish_struct (tree t, tree attributes)
  {
    const char *saved_filename = input_filename;
!   int saved_lineno = input_line;
  
    /* Now that we've got all the field declarations, reverse everything
       as necessary.  */
*************** finish_struct (tree t, tree attributes)
*** 5263,5269 ****
    /* Nadger the current location so that diagnostics point to the start of
       the struct, not the end.  */
    input_filename = DECL_SOURCE_FILE (TYPE_NAME (t));
!   lineno = DECL_SOURCE_LINE (TYPE_NAME (t));
  
    if (processing_template_decl)
      {
--- 5263,5269 ----
    /* Nadger the current location so that diagnostics point to the start of
       the struct, not the end.  */
    input_filename = DECL_SOURCE_FILE (TYPE_NAME (t));
!   input_line = DECL_SOURCE_LINE (TYPE_NAME (t));
  
    if (processing_template_decl)
      {
*************** finish_struct (tree t, tree attributes)
*** 5274,5280 ****
      finish_struct_1 (t);
  
    input_filename = saved_filename;
!   lineno = saved_lineno;
  
    TYPE_BEING_DEFINED (t) = 0;
  
--- 5274,5280 ----
      finish_struct_1 (t);
  
    input_filename = saved_filename;
!   input_line = saved_lineno;
  
    TYPE_BEING_DEFINED (t) = 0;
  
Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1046
diff -c -3 -p -r1.1046 decl.c
*** cp/decl.c	30 Apr 2003 13:45:40 -0000	1.1046
--- cp/decl.c	30 Apr 2003 16:25:06 -0000
*************** push_binding_level (struct cp_binding_le
*** 495,501 ****
    newlevel->binding_depth = binding_depth;
    indent ();
    fprintf (stderr, "push %s level 0x%08x line %d\n",
! 	   (is_class_level) ? "class" : "block", newlevel, lineno);
    is_class_level = 0;
    binding_depth++;
  #endif /* defined(DEBUG_BINDING_LEVELS) */
--- 495,501 ----
    newlevel->binding_depth = binding_depth;
    indent ();
    fprintf (stderr, "push %s level 0x%08x line %d\n",
! 	   (is_class_level) ? "class" : "block", newlevel, input_line);
    is_class_level = 0;
    binding_depth++;
  #endif /* defined(DEBUG_BINDING_LEVELS) */
*************** pop_binding_level (void)
*** 532,538 ****
    indent ();
    fprintf (stderr, "pop  %s level 0x%08x line %d\n",
  	  (is_class_level) ? "class" : "block",
! 	  current_binding_level, lineno);
    if (is_class_level != (current_binding_level == class_binding_level))
      {
        indent ();
--- 532,538 ----
    indent ();
    fprintf (stderr, "pop  %s level 0x%08x line %d\n",
  	  (is_class_level) ? "class" : "block",
! 	  current_binding_level, input_line);
    if (is_class_level != (current_binding_level == class_binding_level))
      {
        indent ();
*************** suspend_binding_level (void)
*** 571,577 ****
    indent ();
    fprintf (stderr, "suspend  %s level 0x%08x line %d\n",
  	  (is_class_level) ? "class" : "block",
! 	  current_binding_level, lineno);
    if (is_class_level != (current_binding_level == class_binding_level))
      {
        indent ();
--- 571,577 ----
    indent ();
    fprintf (stderr, "suspend  %s level 0x%08x line %d\n",
  	  (is_class_level) ? "class" : "block",
! 	  current_binding_level, input_line);
    if (is_class_level != (current_binding_level == class_binding_level))
      {
        indent ();
*************** resume_binding_level (struct cp_binding_
*** 596,602 ****
    b->binding_depth = binding_depth;
    indent ();
    fprintf (stderr, "resume %s level 0x%08x line %d\n",
! 	   (is_class_level) ? "class" : "block", b, lineno);
    is_class_level = 0;
    binding_depth++;
  #endif /* defined(DEBUG_BINDING_LEVELS) */
--- 596,602 ----
    b->binding_depth = binding_depth;
    indent ();
    fprintf (stderr, "resume %s level 0x%08x line %d\n",
! 	   (is_class_level) ? "class" : "block", b, input_line);
    is_class_level = 0;
    binding_depth++;
  #endif /* defined(DEBUG_BINDING_LEVELS) */
*************** make_label_decl (tree id, int local_p)
*** 4598,4604 ****
  
    /* 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_FILE (decl) = input_filename;
  
    /* Record the fact that this identifier is bound to this label.  */
--- 4598,4604 ----
  
    /* Say where one reference is to the label, for the sake of the
       error if it is not defined.  */
!   DECL_SOURCE_LINE (decl) = input_line;
    DECL_SOURCE_FILE (decl) = input_filename;
  
    /* Record the fact that this identifier is bound to this label.  */
*************** use_label (tree decl)
*** 4625,4631 ****
        new_ent->label_decl = decl;
        new_ent->names_in_scope = current_binding_level->names;
        new_ent->binding_level = current_binding_level;
!       new_ent->o_goto_locus.line = lineno;
        new_ent->o_goto_locus.file = input_filename;
        new_ent->next = named_label_uses;
        named_label_uses = new_ent;
--- 4625,4631 ----
        new_ent->label_decl = decl;
        new_ent->names_in_scope = current_binding_level->names;
        new_ent->binding_level = current_binding_level;
!       new_ent->o_goto_locus.line = nput_line;
        new_ent->o_goto_locus.file = input_filename;
        new_ent->next = named_label_uses;
        named_label_uses = new_ent;
*************** start_function (tree declspecs, tree dec
*** 13486,13492 ****
       CFUN set up, and our per-function variables initialized.
       FIXME factor out the non-RTL stuff.  */
    bl = current_binding_level;
!   init_function_start (decl1, input_filename, lineno);
    current_binding_level = bl;
  
    /* Even though we're inside a function body, we still don't want to
--- 13486,13492 ----
       CFUN set up, and our per-function variables initialized.
       FIXME factor out the non-RTL stuff.  */
    bl = current_binding_level;
!   init_function_start (decl1, input_filename, input_line);
    current_binding_level = bl;
  
    /* Even though we're inside a function body, we still don't want to
Index: cp/decl2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl2.c,v
retrieving revision 1.621
diff -c -3 -p -r1.621 decl2.c
*** cp/decl2.c	26 Apr 2003 20:22:12 -0000	1.621
--- cp/decl2.c	30 Apr 2003 16:25:15 -0000
*************** warn_if_unknown_interface (tree decl)
*** 178,194 ****
    if (flag_alt_external_templates)
      {
        tree til = tinst_for_decl ();
!       int sl = lineno;
        const char *sf = input_filename;
  
        if (til)
  	{
! 	  lineno = TINST_LINE (til);
  	  input_filename = TINST_FILE (til);
  	}
        warning ("template `%#D' instantiated in file without #pragma interface",
  		  decl);
!       lineno = sl;
        input_filename = sf;
      }
    else
--- 178,194 ----
    if (flag_alt_external_templates)
      {
        tree til = tinst_for_decl ();
!       int sl = input_line;
        const char *sf = input_filename;
  
        if (til)
  	{
! 	  input_line = TINST_LINE (til);
  	  input_filename = TINST_FILE (til);
  	}
        warning ("template `%#D' instantiated in file without #pragma interface",
  		  decl);
!       input_line = sl;
        input_filename = sf;
      }
    else
*************** start_static_initialization_or_destructi
*** 2234,2240 ****
       that the debugger will show somewhat sensible file and line
       information.  */
    input_filename = DECL_SOURCE_FILE (decl);
!   lineno = DECL_SOURCE_LINE (decl);
  
    /* Because of:
  
--- 2234,2240 ----
       that the debugger will show somewhat sensible file and line
       information.  */
    input_filename = DECL_SOURCE_FILE (decl);
!   input_line = DECL_SOURCE_LINE (decl);
  
    /* Because of:
  
*************** generate_ctor_or_dtor_function (bool con
*** 2475,2481 ****
    size_t i;
  
    input_filename = locus->file;
!   lineno = locus->line++;
    
    /* We use `I' to indicate initialization and `D' to indicate
       destruction.  */
--- 2475,2481 ----
    size_t i;
  
    input_filename = locus->file;
!   input_line = locus->line++;
    
    /* We use `I' to indicate initialization and `D' to indicate
       destruction.  */
*************** finish_file ()
*** 2555,2561 ****
    unsigned ssdf_count = 0;
  
    locus.file = input_filename;
!   locus.line = lineno;
    at_eof = 1;
  
    /* Bad parse errors.  Just forget about it.  */
--- 2555,2561 ----
    unsigned ssdf_count = 0;
  
    locus.file = input_filename;
!   locus.line = input_line;
    at_eof = 1;
  
    /* Bad parse errors.  Just forget about it.  */
*************** finish_file ()
*** 2567,2573 ****
  
    /* Otherwise, GDB can get confused, because in only knows
       about source for LINENO-1 lines.  */
!   lineno -= 1;
  
    interface_unknown = 1;
    interface_only = 0;
--- 2567,2573 ----
  
    /* Otherwise, GDB can get confused, because in only knows
       about source for LINENO-1 lines.  */
!   input_line -= 1;
  
    interface_unknown = 1;
    interface_only = 0;
*************** finish_file ()
*** 2687,2693 ****
  	  /* Set the line and file, so that it is obviously not from
  	     the source file.  */
  	  input_filename = locus.file;
! 	  lineno = locus.line;
  	  ssdf_body = start_static_storage_duration_function (ssdf_count);
  
  	  /* Make sure the back end knows about all the variables.  */
--- 2687,2693 ----
  	  /* Set the line and file, so that it is obviously not from
  	     the source file.  */
  	  input_filename = locus.file;
! 	  input_line = locus.line;
  	  ssdf_body = start_static_storage_duration_function (ssdf_count);
  
  	  /* Make sure the back end knows about all the variables.  */
*************** finish_file ()
*** 2716,2722 ****
  	  /* Finish up the static storage duration function for this
  	     round.  */
  	  input_filename = locus.file;
! 	  lineno = locus.line;
  	  finish_static_storage_duration_function (ssdf_body);
  
  	  /* All those initializations and finalizations might cause
--- 2716,2722 ----
  	  /* Finish up the static storage duration function for this
  	     round.  */
  	  input_filename = locus.file;
! 	  input_line = locus.line;
  	  finish_static_storage_duration_function (ssdf_body);
  
  	  /* All those initializations and finalizations might cause
*************** finish_file ()
*** 2906,2912 ****
        dump_time_statistics ();
      }
    input_filename = locus.file;
!   lineno = locus.line;
  }
  
  /* T is the parse tree for an expression.  Return the expression after
--- 2906,2912 ----
        dump_time_statistics ();
      }
    input_filename = locus.file;
!   input_line = locus.line;
  }
  
  /* T is the parse tree for an expression.  Return the expression after
Index: cp/error.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/error.c,v
retrieving revision 1.204
diff -c -3 -p -r1.204 error.c
*** cp/error.c	29 Apr 2003 20:17:00 -0000	1.204
--- cp/error.c	30 Apr 2003 16:25:22 -0000
***************
*** 1,7 ****
  /* Call-backs for C++ error reporting.
     This code is non-reentrant.
!    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002
!    Free Software Foundation, Inc.
     This file is part of GCC.
  
  GCC is free software; you can redistribute it and/or modify
--- 1,7 ----
  /* Call-backs for C++ error reporting.
     This code is non-reentrant.
!    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002,
!    2003 Free Software Foundation, Inc.
     This file is part of GCC.
  
  GCC is free software; you can redistribute it and/or modify
*************** cp_line_of (tree t)
*** 2159,2165 ****
      line = DECL_SOURCE_LINE (t);
  
    if (line == 0)
!     return lineno;
  
    return line;
  }
--- 2159,2165 ----
      line = DECL_SOURCE_LINE (t);
  
    if (line == 0)
!     return input_line;
  
    return line;
  }
*************** static void
*** 2406,2412 ****
  print_instantiation_full_context (diagnostic_context *context)
  {
    tree p = current_instantiation ();
!   int line = lineno;
    const char *file = input_filename;
  
    if (p)
--- 2406,2412 ----
  print_instantiation_full_context (diagnostic_context *context)
  {
    tree p = current_instantiation ();
!   int line = input_line;
    const char *file = input_filename;
  
    if (p)
*************** void
*** 2468,2474 ****
  print_instantiation_context (void)
  {
    print_instantiation_partial_context
!     (global_dc, current_instantiation (), input_filename, lineno);
    diagnostic_flush_buffer (global_dc);
  }
  
--- 2468,2474 ----
  print_instantiation_context (void)
  {
    print_instantiation_partial_context
!     (global_dc, current_instantiation (), input_filename, input_line);
    diagnostic_flush_buffer (global_dc);
  }
  
Index: cp/except.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/except.c,v
retrieving revision 1.154
diff -c -3 -p -r1.154 except.c
*** cp/except.c	7 Mar 2003 07:45:29 -0000	1.154
--- cp/except.c	30 Apr 2003 16:25:22 -0000
*************** check_handlers_1 (tree master, tree hand
*** 915,924 ****
      if (TREE_TYPE (handler)
  	&& can_convert_eh (type, TREE_TYPE (handler)))
        {
! 	lineno = STMT_LINENO (handler);
  	warning ("exception of type `%T' will be caught",
  		    TREE_TYPE (handler));
! 	lineno = STMT_LINENO (master);
  	warning ("   by earlier handler for `%T'", type);
  	break;
        }
--- 915,924 ----
      if (TREE_TYPE (handler)
  	&& can_convert_eh (type, TREE_TYPE (handler)))
        {
! 	input_line = STMT_LINENO (handler);
  	warning ("exception of type `%T' will be caught",
  		    TREE_TYPE (handler));
! 	input_line = STMT_LINENO (master);
  	warning ("   by earlier handler for `%T'", type);
  	break;
        }
*************** void
*** 930,948 ****
  check_handlers (tree handlers)
  {
    tree handler;
!   int save_line = lineno;
    for (handler = handlers; handler; handler = TREE_CHAIN (handler))
      {
        if (TREE_CHAIN (handler) == NULL_TREE)
  	/* No more handlers; nothing to shadow.  */;
        else if (TREE_TYPE (handler) == NULL_TREE)
  	{
! 	  lineno = STMT_LINENO (handler);
  	  pedwarn
  	    ("`...' handler must be the last handler for its try block");
  	}
        else
  	check_handlers_1 (handler, TREE_CHAIN (handler));
      }
!   lineno = save_line;
  }
--- 930,949 ----
  check_handlers (tree handlers)
  {
    tree handler;
!   int save_line = input_line;
!   
    for (handler = handlers; handler; handler = TREE_CHAIN (handler))
      {
        if (TREE_CHAIN (handler) == NULL_TREE)
  	/* No more handlers; nothing to shadow.  */;
        else if (TREE_TYPE (handler) == NULL_TREE)
  	{
! 	  input_line = STMT_LINENO (handler);
  	  pedwarn
  	    ("`...' handler must be the last handler for its try block");
  	}
        else
  	check_handlers_1 (handler, TREE_CHAIN (handler));
      }
!   input_line = save_line;
  }
Index: cp/init.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/init.c,v
retrieving revision 1.317
diff -c -3 -p -r1.317 init.c
*** cp/init.c	13 Apr 2003 17:54:02 -0000	1.317
--- cp/init.c	30 Apr 2003 16:25:30 -0000
*************** create_temporary_var (type)
*** 2676,2682 ****
    TREE_USED (decl) = 1;
    DECL_ARTIFICIAL (decl) = 1;
    DECL_SOURCE_FILE (decl) = input_filename;
!   DECL_SOURCE_LINE (decl) = lineno;
    DECL_IGNORED_P (decl) = 1;
    DECL_CONTEXT (decl) = current_function_decl;
  
--- 2676,2682 ----
    TREE_USED (decl) = 1;
    DECL_ARTIFICIAL (decl) = 1;
    DECL_SOURCE_FILE (decl) = input_filename;
!   DECL_SOURCE_LINE (decl) = input_line;
    DECL_IGNORED_P (decl) = 1;
    DECL_CONTEXT (decl) = current_function_decl;
  
Index: cp/method.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/method.c,v
retrieving revision 1.247
diff -c -3 -p -r1.247 method.c
*** cp/method.c	28 Apr 2003 06:06:57 -0000	1.247
--- cp/method.c	30 Apr 2003 16:25:32 -0000
***************
*** 1,7 ****
  /* Handle the hair of processing (but not expanding) inline functions.
     Also manage function and variable name overloading.
     Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 
!    1999, 2000, 2001, 2002 Free Software Foundation, Inc.
     Contributed by Michael Tiemann (tiemann@cygnus.com)
  
  This file is part of GCC.
--- 1,7 ----
  /* Handle the hair of processing (but not expanding) inline functions.
     Also manage function and variable name overloading.
     Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 
!    1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
     Contributed by Michael Tiemann (tiemann@cygnus.com)
  
  This file is part of GCC.
*************** use_thunk (tree thunk_fndecl, bool emit_
*** 429,435 ****
        DECL_RESULT (thunk_fndecl)
  	= build_decl (RESULT_DECL, 0, integer_type_node);
        fnname = XSTR (XEXP (DECL_RTL (thunk_fndecl), 0), 0);
!       init_function_start (thunk_fndecl, input_filename, lineno);
        current_function_is_thunk = 1;
        assemble_start_function (thunk_fndecl, fnname);
  
--- 429,435 ----
        DECL_RESULT (thunk_fndecl)
  	= build_decl (RESULT_DECL, 0, integer_type_node);
        fnname = XSTR (XEXP (DECL_RTL (thunk_fndecl), 0), 0);
!       init_function_start (thunk_fndecl, input_filename, input_line);
        current_function_is_thunk = 1;
        assemble_start_function (thunk_fndecl, fnname);
  
*************** synthesize_method (tree fndecl)
*** 754,760 ****
       where the attempt to generate the function occurs, giving the
       user a hint as to why we are attempting to generate the
       function.  */
!   DECL_SOURCE_LINE (fndecl) = lineno;
    DECL_SOURCE_FILE (fndecl) = input_filename;
  
    interface_unknown = 1;
--- 754,760 ----
       where the attempt to generate the function occurs, giving the
       user a hint as to why we are attempting to generate the
       function.  */
!   DECL_SOURCE_LINE (fndecl) = input_line;
    DECL_SOURCE_FILE (fndecl) = input_filename;
  
    interface_unknown = 1;
Index: cp/parser.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/parser.c,v
retrieving revision 1.57
diff -c -3 -p -r1.57 parser.c
*** cp/parser.c	23 Apr 2003 22:44:05 -0000	1.57
--- cp/parser.c	30 Apr 2003 16:26:03 -0000
*************** cp_lexer_set_source_position_from_token 
*** 407,413 ****
    /* Update the line number.  */
    if (token->type != CPP_EOF)
      {
!       lineno = token->line_number;
        input_filename = token->file_name;
      }
  }
--- 407,413 ----
    /* Update the line number.  */
    if (token->type != CPP_EOF)
      {
!       input_line = token->line_number;
        input_filename = token->file_name;
      }
  }
*************** cp_lexer_get_preprocessor_token (cp_lexe
*** 651,657 ****
  	}
      }
    /* Now we've got our token.  */
!   token->line_number = lineno;
    token->file_name = input_filename;
  
    /* Check to see if this token is a keyword.  */
--- 651,657 ----
  	}
      }
    /* Now we've got our token.  */
!   token->line_number = input_line;
    token->file_name = input_filename;
  
    /* Check to see if this token is a keyword.  */
Index: cp/pt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/pt.c,v
retrieving revision 1.685
diff -c -3 -p -r1.685 pt.c
*** cp/pt.c	29 Apr 2003 22:15:34 -0000	1.685
--- cp/pt.c	30 Apr 2003 16:26:28 -0000
*************** push_tinst_level (d)
*** 4783,4789 ****
        return 0;
      }
  
!   new = build_expr_wfl (d, input_filename, lineno, 0);
    TREE_CHAIN (new) = current_tinst_level;
    current_tinst_level = new;
  
--- 4783,4789 ----
        return 0;
      }
  
!   new = build_expr_wfl (d, input_filename, input_line, 0);
    TREE_CHAIN (new) = current_tinst_level;
    current_tinst_level = new;
  
*************** pop_tinst_level ()
*** 4807,4813 ****
  
    /* Restore the filename and line number stashed away when we started
       this instantiation.  */
!   lineno = TINST_LINE (old);
    input_filename = TINST_FILE (old);
    extract_interface_info ();
    
--- 4807,4813 ----
  
    /* Restore the filename and line number stashed away when we started
       this instantiation.  */
!   input_line = TINST_LINE (old);
    input_filename = TINST_FILE (old);
    extract_interface_info ();
    
*************** tsubst_friend_function (decl, args)
*** 4859,4868 ****
       tree args;
  {
    tree new_friend;
!   int line = lineno;
    const char *file = input_filename;
  
!   lineno = DECL_SOURCE_LINE (decl);
    input_filename = DECL_SOURCE_FILE (decl);
  
    if (TREE_CODE (decl) == FUNCTION_DECL 
--- 4859,4868 ----
       tree args;
  {
    tree new_friend;
!   int line = input_line;
    const char *file = input_filename;
  
!   input_line = DECL_SOURCE_LINE (decl);
    input_filename = DECL_SOURCE_FILE (decl);
  
    if (TREE_CODE (decl) == FUNCTION_DECL 
*************** tsubst_friend_function (decl, args)
*** 5070,5076 ****
      }
  
   done:
!   lineno = line;
    input_filename = file;
    return new_friend;
  }
--- 5070,5076 ----
      }
  
   done:
!   input_line = line;
    input_filename = file;
    return new_friend;
  }
*************** instantiate_class_template (type)
*** 5430,5439 ****
  		{
  		  tree r;
  
! 		  /* The the file and line for this declaration, to assist
! 		     in error message reporting.  Since we called 
! 		     push_tinst_level above, we don't need to restore these.  */
! 		  lineno = DECL_SOURCE_LINE (t);
  		  input_filename = DECL_SOURCE_FILE (t);
  
  		  r = tsubst (t, args, tf_error | tf_warning, NULL_TREE);
--- 5430,5440 ----
  		{
  		  tree r;
  
! 		  /* The the file and line for this declaration, to
! 		     assist in error message reporting.  Since we
! 		     called push_tinst_level above, we don't need to
! 		     restore these.  */
! 		  input_line = DECL_SOURCE_LINE (t);
  		  input_filename = DECL_SOURCE_FILE (t);
  
  		  r = tsubst (t, args, tf_error | tf_warning, NULL_TREE);
*************** instantiate_class_template (type)
*** 5536,5542 ****
       implicit functions at a predictable point, and the same point
       that would be used for non-template classes.  */
    typedecl = TYPE_MAIN_DECL (type);
!   lineno = DECL_SOURCE_LINE (typedecl);
    input_filename = DECL_SOURCE_FILE (typedecl);
  
    unreverse_member_declarations (type);
--- 5537,5543 ----
       implicit functions at a predictable point, and the same point
       that would be used for non-template classes.  */
    typedecl = TYPE_MAIN_DECL (type);
!   input_line = DECL_SOURCE_LINE (typedecl);
    input_filename = DECL_SOURCE_FILE (typedecl);
  
    unreverse_member_declarations (type);
*************** tsubst_decl (t, args, type, complain)
*** 5881,5889 ****
    tree in_decl = t;
  
    /* Set the filename and linenumber to improve error-reporting.  */
!   saved_lineno = lineno;
    saved_filename = input_filename;
!   lineno = DECL_SOURCE_LINE (t);
    input_filename = DECL_SOURCE_FILE (t);
  
    switch (TREE_CODE (t))
--- 5882,5890 ----
    tree in_decl = t;
  
    /* Set the filename and linenumber to improve error-reporting.  */
!   saved_lineno = input_line;
    saved_filename = input_filename;
!   input_line = DECL_SOURCE_LINE (t);
    input_filename = DECL_SOURCE_FILE (t);
  
    switch (TREE_CODE (t))
*************** tsubst_decl (t, args, type, complain)
*** 6350,6356 ****
      } 
  
    /* Restore the file and line information.  */
!   lineno = saved_lineno;
    input_filename = saved_filename;
  
    return r;
--- 6351,6357 ----
      } 
  
    /* Restore the file and line information.  */
!   input_line = saved_lineno;
    input_filename = saved_filename;
  
    return r;
*************** tsubst (t, args, complain, in_decl)
*** 6873,6879 ****
  	       message to avoid spewing a ton of messages during a
  	       single bad template instantiation.  */
  	    if (complain & tf_error
! 		&& (last_line != lineno || last_file != input_filename))
  	      {
  		if (TREE_CODE (type) == VOID_TYPE)
  		  error ("forming reference to void");
--- 6874,6880 ----
  	       message to avoid spewing a ton of messages during a
  	       single bad template instantiation.  */
  	    if (complain & tf_error
! 		&& (last_line != input_line || last_file != input_filename))
  	      {
  		if (TREE_CODE (type) == VOID_TYPE)
  		  error ("forming reference to void");
*************** tsubst (t, args, complain, in_decl)
*** 6881,6887 ****
  		  error ("forming %s to reference type `%T'",
  			    (code == POINTER_TYPE) ? "pointer" : "reference",
  			    type);
! 		last_line = lineno;
  		last_file = input_filename;
  	      }
  
--- 6882,6888 ----
  		  error ("forming %s to reference type `%T'",
  			    (code == POINTER_TYPE) ? "pointer" : "reference",
  			    type);
! 		last_line = input_line;
  		last_file = input_filename;
  	      }
  
*************** tsubst_expr (t, args, complain, in_decl)
*** 7777,7783 ****
        break;
  
      case LABEL_STMT:
!       lineno = STMT_LINENO (t);
        finish_label_stmt (DECL_NAME (LABEL_STMT_LABEL (t)));
        break;
  
--- 7778,7784 ----
        break;
  
      case LABEL_STMT:
!       input_line = STMT_LINENO (t);
        finish_label_stmt (DECL_NAME (LABEL_STMT_LABEL (t)));
        break;
  
*************** instantiate_decl (d, defer_ok)
*** 10756,10762 ****
    tree spec;
    tree gen_tmpl;
    int pattern_defined;
!   int line = lineno;
    int need_push;
    const char *file = input_filename;
  
--- 10757,10763 ----
    tree spec;
    tree gen_tmpl;
    int pattern_defined;
!   int line = input_line;
    int need_push;
    const char *file = input_filename;
  
*************** instantiate_decl (d, defer_ok)
*** 10822,10828 ****
    else
      pattern_defined = ! DECL_IN_AGGR_P (code_pattern);
  
!   lineno = DECL_SOURCE_LINE (d);
    input_filename = DECL_SOURCE_FILE (d);
  
    if (pattern_defined)
--- 10823,10829 ----
    else
      pattern_defined = ! DECL_IN_AGGR_P (code_pattern);
  
!   input_line = DECL_SOURCE_LINE (d);
    input_filename = DECL_SOURCE_FILE (d);
  
    if (pattern_defined)
*************** instantiate_decl (d, defer_ok)
*** 10910,10916 ****
       because it's used by add_pending_template.  */
    else if (! pattern_defined || defer_ok)
      {
!       lineno = line;
        input_filename = file;
  
        if (at_eof && !pattern_defined 
--- 10911,10917 ----
       because it's used by add_pending_template.  */
    else if (! pattern_defined || defer_ok)
      {
!       input_line = line;
        input_filename = file;
  
        if (at_eof && !pattern_defined 
*************** instantiate_decl (d, defer_ok)
*** 10939,10945 ****
    
    /* We already set the file and line above.  Reset them now in case
       they changed as a result of calling regenerate_decl_from_template.  */
!   lineno = DECL_SOURCE_LINE (d);
    input_filename = DECL_SOURCE_FILE (d);
  
    if (TREE_CODE (d) == VAR_DECL)
--- 10940,10946 ----
    
    /* We already set the file and line above.  Reset them now in case
       they changed as a result of calling regenerate_decl_from_template.  */
!   input_line = DECL_SOURCE_LINE (d);
    input_filename = DECL_SOURCE_FILE (d);
  
    if (TREE_CODE (d) == VAR_DECL)
*************** instantiate_decl (d, defer_ok)
*** 11045,11051 ****
      pop_from_top_level ();
  
  out:
!   lineno = line;
    input_filename = file;
  
    pop_tinst_level ();
--- 11046,11052 ----
      pop_from_top_level ();
  
  out:
!   input_line = line;
    input_filename = file;
  
    pop_tinst_level ();
Index: cp/semantics.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/semantics.c,v
retrieving revision 1.301
diff -c -3 -p -r1.301 semantics.c
*** cp/semantics.c	23 Apr 2003 16:27:26 -0000	1.301
--- cp/semantics.c	30 Apr 2003 16:26:33 -0000
*************** genrtl_try_block (t)
*** 745,751 ****
    else
      {
        if (!FN_TRY_BLOCK_P (t)) 
! 	emit_line_note (input_filename, lineno);
  
        expand_eh_region_start ();
        expand_stmt (TRY_STMTS (t));
--- 745,751 ----
    else
      {
        if (!FN_TRY_BLOCK_P (t)) 
! 	emit_line_note (input_filename, input_line);
  
        expand_eh_region_start ();
        expand_stmt (TRY_STMTS (t));
*************** tree
*** 1105,1111 ****
  finish_label_stmt (name)
       tree name;
  {
!   tree decl = define_label (input_filename, lineno, name);
    return add_stmt (build_stmt (LABEL_STMT, decl));
  }
  
--- 1105,1111 ----
  finish_label_stmt (name)
       tree name;
  {
!   tree decl = define_label (input_filename, input_line, name);
    return add_stmt (build_stmt (LABEL_STMT, decl));
  }
  
*************** begin_class_definition (t)
*** 1805,1811 ****
  
    /* Update the location of the decl.  */
    DECL_SOURCE_FILE (TYPE_NAME (t)) = input_filename;
!   DECL_SOURCE_LINE (TYPE_NAME (t)) = lineno;
    
    if (TYPE_BEING_DEFINED (t))
      {
--- 1805,1811 ----
  
    /* Update the location of the decl.  */
    DECL_SOURCE_FILE (TYPE_NAME (t)) = input_filename;
!   DECL_SOURCE_LINE (TYPE_NAME (t)) = input_line;
    
    if (TYPE_BEING_DEFINED (t))
      {
*************** expand_body (fn)
*** 2386,2395 ****
    /* Save the current file name and line number.  When we expand the
       body of the function, we'll set LINENO and INPUT_FILENAME so that
       error-mesages come out in the right places.  */
!   saved_lineno = lineno;
    saved_input_filename = input_filename;
    saved_function = current_function_decl;
!   lineno = DECL_SOURCE_LINE (fn);
    input_filename = DECL_SOURCE_FILE (fn);
    current_function_decl = fn;
  
--- 2386,2395 ----
    /* Save the current file name and line number.  When we expand the
       body of the function, we'll set LINENO and INPUT_FILENAME so that
       error-mesages come out in the right places.  */
!   saved_lineno = input_line;
    saved_input_filename = input_filename;
    saved_function = current_function_decl;
!   input_line = DECL_SOURCE_LINE (fn);
    input_filename = DECL_SOURCE_FILE (fn);
    current_function_decl = fn;
  
*************** expand_body (fn)
*** 2413,2419 ****
  
    /* The outermost statement for a function contains the line number
       recorded when we finished processing the function.  */
!   lineno = STMT_LINENO (DECL_SAVED_TREE (fn));
  
    /* Generate code for the function.  */
    genrtl_finish_function (fn);
--- 2413,2419 ----
  
    /* The outermost statement for a function contains the line number
       recorded when we finished processing the function.  */
!   input_line = STMT_LINENO (DECL_SAVED_TREE (fn));
  
    /* Generate code for the function.  */
    genrtl_finish_function (fn);
*************** expand_body (fn)
*** 2433,2439 ****
  
    /* And restore the current source position.  */
    current_function_decl = saved_function;
!   lineno = saved_lineno;
    input_filename = saved_input_filename;
    extract_interface_info ();
  
--- 2433,2439 ----
  
    /* And restore the current source position.  */
    current_function_decl = saved_function;
!   input_line = saved_lineno;
    input_filename = saved_input_filename;
    extract_interface_info ();
  
*************** genrtl_finish_function (fn)
*** 2577,2583 ****
    immediate_size_expand = 1;
  
    /* Generate rtl for function exit.  */
!   expand_function_end (input_filename, lineno, 0);
  
    /* If this is a nested function (like a template instantiation that
       we're compiling in the midst of compiling something else), push a
--- 2577,2583 ----
    immediate_size_expand = 1;
  
    /* Generate rtl for function exit.  */
!   expand_function_end (input_filename, input_line, 0);
  
    /* If this is a nested function (like a template instantiation that
       we're compiling in the midst of compiling something else), push a
Index: cp/tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/tree.c,v
retrieving revision 1.323
diff -c -3 -p -r1.323 tree.c
*** cp/tree.c	15 Apr 2003 00:34:11 -0000	1.323
--- cp/tree.c	30 Apr 2003 16:26:38 -0000
*************** build_min_nt VPARAMS ((enum tree_code co
*** 1512,1518 ****
  
    t = make_node (code);
    length = TREE_CODE_LENGTH (code);
!   TREE_COMPLEXITY (t) = lineno;
  
    for (i = 0; i < length; i++)
      {
--- 1512,1518 ----
  
    t = make_node (code);
    length = TREE_CODE_LENGTH (code);
!   TREE_COMPLEXITY (t) = input_line;
  
    for (i = 0; i < length; i++)
      {
*************** build_min VPARAMS ((enum tree_code code,
*** 1541,1547 ****
    t = make_node (code);
    length = TREE_CODE_LENGTH (code);
    TREE_TYPE (t) = tt;
!   TREE_COMPLEXITY (t) = lineno;
  
    for (i = 0; i < length; i++)
      {
--- 1541,1547 ----
    t = make_node (code);
    length = TREE_CODE_LENGTH (code);
    TREE_TYPE (t) = tt;
!   TREE_COMPLEXITY (t) = input_line;
  
    for (i = 0; i < length; i++)
      {
Index: f/ansify.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/ansify.c,v
retrieving revision 1.11
diff -c -3 -p -r1.11 ansify.c
*** f/ansify.c	16 Dec 2002 18:22:26 -0000	1.11
--- f/ansify.c	30 Apr 2003 16:26:38 -0000
***************
*** 1,5 ****
  /* ansify.c
!    Copyright (C) 1997 Free Software Foundation, Inc.
     Contributed by James Craig Burley.
  
  This file is part of GNU Fortran.
--- 1,5 ----
  /* ansify.c
!    Copyright (C) 1997, 2003 Free Software Foundation, Inc.
     Contributed by James Craig Burley.
  
  This file is part of GNU Fortran.
*************** the Free Software Foundation, 59 Temple 
*** 27,33 ****
  #define die_unless(c) \
    do if (!(c)) \
      { \
!       fprintf (stderr, "%s:%lu: %s\n", argv[1], lineno, #c); \
        die (); \
      } \
    while(0)
--- 27,33 ----
  #define die_unless(c) \
    do if (!(c)) \
      { \
!       fprintf (stderr, "%s:%lu: %s\n", argv[1], input_line, #c); \
        die (); \
      } \
    while(0)
Index: f/com.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/com.c,v
retrieving revision 1.190
diff -c -3 -p -r1.190 com.c
*** f/com.c	17 Apr 2003 21:27:36 -0000	1.190
--- f/com.c	30 Apr 2003 16:27:10 -0000
*************** ffecom_subscript_check_ (tree array, tre
*** 791,797 ****
  		     arg3);
  
      arg4 = convert (ffecom_f2c_ftnint_type_node,
! 		    build_int_2 (lineno, 0));
  
      arg1 = build_tree_list (NULL_TREE, arg1);
      arg2 = build_tree_list (NULL_TREE, arg2);
--- 791,797 ----
  		     arg3);
  
      arg4 = convert (ffecom_f2c_ftnint_type_node,
! 		    build_int_2 (input_line, 0));
  
      arg1 = build_tree_list (NULL_TREE, arg1);
      arg2 = build_tree_list (NULL_TREE, arg2);
*************** ffecom_do_entry_ (ffesymbol fn, int entr
*** 2583,2593 ****
    bool cmplxfunc;		/* Use f2c way of returning COMPLEX. */
    bool multi;			/* Master fn has multiple return types. */
    bool altreturning = FALSE;	/* This entry point has alternate returns. */
!   int old_lineno = lineno;
    const char *old_input_filename = input_filename;
  
    input_filename = ffesymbol_where_filename (fn);
!   lineno = ffesymbol_where_filelinenum (fn);
  
    ffecom_doing_entry_ = TRUE;	/* Don't bother with array dimensions. */
  
--- 2583,2593 ----
    bool cmplxfunc;		/* Use f2c way of returning COMPLEX. */
    bool multi;			/* Master fn has multiple return types. */
    bool altreturning = FALSE;	/* This entry point has alternate returns. */
!   int old_lineno = input_line;
    const char *old_input_filename = input_filename;
  
    input_filename = ffesymbol_where_filename (fn);
!   input_line = ffesymbol_where_filelinenum (fn);
  
    ffecom_doing_entry_ = TRUE;	/* Don't bother with array dimensions. */
  
*************** ffecom_do_entry_ (ffesymbol fn, int entr
*** 2917,2923 ****
  
    finish_function (0);
  
!   lineno = old_lineno;
    input_filename = old_input_filename;
  
    ffecom_doing_entry_ = FALSE;
--- 2917,2923 ----
  
    finish_function (0);
  
!   input_line = old_lineno;
    input_filename = old_input_filename;
  
    ffecom_doing_entry_ = FALSE;
*************** ffecom_gen_sfuncdef_ (ffesymbol s, ffein
*** 6110,6116 ****
    tree result;
    bool charfunc = (bt == FFEINFO_basictypeCHARACTER);
    static bool recurse = FALSE;
!   int old_lineno = lineno;
    const char *old_input_filename = input_filename;
  
    ffecom_nested_entry_ = s;
--- 6110,6116 ----
    tree result;
    bool charfunc = (bt == FFEINFO_basictypeCHARACTER);
    static bool recurse = FALSE;
!   int old_lineno = input_line;
    const char *old_input_filename = input_filename;
  
    ffecom_nested_entry_ = s;
*************** ffecom_gen_sfuncdef_ (ffesymbol s, ffein
*** 6124,6130 ****
       see how it works at this point.  */
  
    input_filename = ffesymbol_where_filename (s);
!   lineno = ffesymbol_where_filelinenum (s);
  
    /* Pretransform the expression so any newly discovered things belong to the
       outer program unit, not to the statement function. */
--- 6124,6130 ----
       see how it works at this point.  */
  
    input_filename = ffesymbol_where_filename (s);
!   input_line = ffesymbol_where_filelinenum (s);
  
    /* Pretransform the expression so any newly discovered things belong to the
       outer program unit, not to the statement function. */
*************** ffecom_gen_sfuncdef_ (ffesymbol s, ffein
*** 6221,6227 ****
  
    recurse = FALSE;
  
!   lineno = old_lineno;
    input_filename = old_input_filename;
  
    ffecom_nested_entry_ = NULL;
--- 6221,6227 ----
  
    recurse = FALSE;
  
!   input_line = old_lineno;
    input_filename = old_input_filename;
  
    ffecom_nested_entry_ = NULL;
*************** ffecom_start_progunit_ ()
*** 7080,7093 ****
    && (ffecom_primary_entry_kind_ == FFEINFO_kindFUNCTION)
    && (ffecom_master_bt_ == FFEINFO_basictypeNONE);
    bool main_program = FALSE;
!   int old_lineno = lineno;
    const char *old_input_filename = input_filename;
  
    assert (fn != NULL);
    assert (ffesymbol_hook (fn).decl_tree == NULL_TREE);
  
    input_filename = ffesymbol_where_filename (fn);
!   lineno = ffesymbol_where_filelinenum (fn);
  
    switch (ffecom_primary_entry_kind_)
      {
--- 7080,7093 ----
    && (ffecom_primary_entry_kind_ == FFEINFO_kindFUNCTION)
    && (ffecom_master_bt_ == FFEINFO_basictypeNONE);
    bool main_program = FALSE;
!   int old_lineno = input_line;
    const char *old_input_filename = input_filename;
  
    assert (fn != NULL);
    assert (ffesymbol_hook (fn).decl_tree == NULL_TREE);
  
    input_filename = ffesymbol_where_filename (fn);
!   input_line = ffesymbol_where_filelinenum (fn);
  
    switch (ffecom_primary_entry_kind_)
      {
*************** ffecom_start_progunit_ ()
*** 7269,7275 ****
    /* Disallow temp vars at this level.  */
    current_binding_level->prep_state = 2;
  
!   lineno = old_lineno;
    input_filename = old_input_filename;
  
    /* This handles any symbols still untransformed, in case -g specified.
--- 7269,7275 ----
    /* Disallow temp vars at this level.  */
    current_binding_level->prep_state = 2;
  
!   input_line = old_lineno;
    input_filename = old_input_filename;
  
    /* This handles any symbols still untransformed, in case -g specified.
*************** ffecom_sym_transform_ (ffesymbol s)
*** 7298,7304 ****
    ffeinfoBasictype bt;
    ffeinfoKindtype kt;
    ffeglobal g;
!   int old_lineno = lineno;
    const char *old_input_filename = input_filename;
  
    /* Must ensure special ASSIGN variables are declared at top of outermost
--- 7298,7304 ----
    ffeinfoBasictype bt;
    ffeinfoKindtype kt;
    ffeglobal g;
!   int old_lineno = input_line;
    const char *old_input_filename = input_filename;
  
    /* Must ensure special ASSIGN variables are declared at top of outermost
*************** ffecom_sym_transform_ (ffesymbol s)
*** 7318,7331 ****
    if (ffesymbol_sfdummyparent (s) == NULL)
      {
        input_filename = ffesymbol_where_filename (s);
!       lineno = ffesymbol_where_filelinenum (s);
      }
    else
      {
        ffesymbol sf = ffesymbol_sfdummyparent (s);
  
        input_filename = ffesymbol_where_filename (sf);
!       lineno = ffesymbol_where_filelinenum (sf);
      }
  
    bt = ffeinfo_basictype (ffebld_info (s));
--- 7318,7331 ----
    if (ffesymbol_sfdummyparent (s) == NULL)
      {
        input_filename = ffesymbol_where_filename (s);
!       input_line = ffesymbol_where_filelinenum (s);
      }
    else
      {
        ffesymbol sf = ffesymbol_sfdummyparent (s);
  
        input_filename = ffesymbol_where_filename (sf);
!       input_line = ffesymbol_where_filelinenum (sf);
      }
  
    bt = ffeinfo_basictype (ffebld_info (s));
*************** ffecom_sym_transform_ (ffesymbol s)
*** 8294,8300 ****
    ffesymbol_hook (s).length_tree = tlen;
    ffesymbol_hook (s).addr = addr;
  
!   lineno = old_lineno;
    input_filename = old_input_filename;
  
    return s;
--- 8294,8300 ----
    ffesymbol_hook (s).length_tree = tlen;
    ffesymbol_hook (s).addr = addr;
  
!   input_line = old_lineno;
    input_filename = old_input_filename;
  
    return s;
*************** static ffesymbol
*** 8312,8331 ****
  ffecom_sym_transform_assign_ (ffesymbol s)
  {
    tree t;			/* Transformed thingy. */
!   int old_lineno = lineno;
    const char *old_input_filename = input_filename;
  
    if (ffesymbol_sfdummyparent (s) == NULL)
      {
        input_filename = ffesymbol_where_filename (s);
!       lineno = ffesymbol_where_filelinenum (s);
      }
    else
      {
        ffesymbol sf = ffesymbol_sfdummyparent (s);
  
        input_filename = ffesymbol_where_filename (sf);
!       lineno = ffesymbol_where_filelinenum (sf);
      }
  
    assert (!ffecom_transform_only_dummies_);
--- 8312,8331 ----
  ffecom_sym_transform_assign_ (ffesymbol s)
  {
    tree t;			/* Transformed thingy. */
!   int old_lineno = input_line;
    const char *old_input_filename = input_filename;
  
    if (ffesymbol_sfdummyparent (s) == NULL)
      {
        input_filename = ffesymbol_where_filename (s);
!       input_line = ffesymbol_where_filelinenum (s);
      }
    else
      {
        ffesymbol sf = ffesymbol_sfdummyparent (s);
  
        input_filename = ffesymbol_where_filename (sf);
!       input_line = ffesymbol_where_filelinenum (sf);
      }
  
    assert (!ffecom_transform_only_dummies_);
*************** ffecom_sym_transform_assign_ (ffesymbol 
*** 8375,8381 ****
  
    ffesymbol_hook (s).assign_tree = t;
  
!   lineno = old_lineno;
    input_filename = old_input_filename;
  
    return s;
--- 8375,8381 ----
  
    ffesymbol_hook (s).assign_tree = t;
  
!   input_line = old_lineno;
    input_filename = old_input_filename;
  
    return s;
*************** ffecom_which_entrypoint_decl ()
*** 13115,13121 ****
  static void
  bison_rule_pushlevel_ ()
  {
!   emit_line_note (input_filename, lineno);
    pushlevel (0);
    clear_last_expr ();
    expand_start_bindings (0);
--- 13115,13121 ----
  static void
  bison_rule_pushlevel_ ()
  {
!   emit_line_note (input_filename, input_line);
    pushlevel (0);
    clear_last_expr ();
    expand_start_bindings (0);
*************** bison_rule_compstmt_ ()
*** 13131,13137 ****
    if (! keep)
      current_binding_level->names = NULL_TREE;
  
!   emit_line_note (input_filename, lineno);
    expand_end_bindings (getdecls (), keep, 0);
    t = poplevel (keep, 1, 0);
  
--- 13131,13137 ----
    if (! keep)
      current_binding_level->names = NULL_TREE;
  
!   emit_line_note (input_filename, input_line);
    expand_end_bindings (getdecls (), keep, 0);
    t = poplevel (keep, 1, 0);
  
*************** finish_function (int nested)
*** 13585,13591 ****
  
        /* Obey `register' declarations if `setjmp' is called in this fn.  */
        /* Generate rtl for function exit.  */
!       expand_function_end (input_filename, lineno, 0);
  
        /* If this is a nested function, protect the local variables in the stack
  	 above us from being collected while we're compiling this function.  */
--- 13585,13591 ----
  
        /* Obey `register' declarations if `setjmp' is called in this fn.  */
        /* Generate rtl for function exit.  */
!       expand_function_end (input_filename, input_line, 0);
  
        /* If this is a nested function, protect the local variables in the stack
  	 above us from being collected while we're compiling this function.  */
*************** store_parm_decls (int is_main_program UN
*** 13866,13872 ****
  
    /* Initialize the RTL code for the function.  */
  
!   init_function_start (fndecl, input_filename, lineno);
  
    /* Set up parameters and prepare for return, for the function.  */
  
--- 13866,13872 ----
  
    /* Initialize the RTL code for the function.  */
  
!   init_function_start (fndecl, input_filename, input_line);
  
    /* Set up parameters and prepare for return, for the function.  */
  
Index: f/intrin.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/intrin.c,v
retrieving revision 1.24
diff -c -3 -p -r1.24 intrin.c
*** f/intrin.c	6 Feb 2002 21:49:42 -0000	1.24
--- f/intrin.c	30 Apr 2003 16:27:14 -0000
***************
*** 1,5 ****
  /* intrin.c -- Recognize references to intrinsics
!    Copyright (C) 1995, 1996, 1997, 1998, 2002 Free Software Foundation, Inc.
     Contributed by James Craig Burley.
  
  This file is part of GNU Fortran.
--- 1,6 ----
  /* intrin.c -- Recognize references to intrinsics
!    Copyright (C) 1995, 1996, 1997, 1998, 2002,
!    2003 Free Software Foundation, Inc.
     Contributed by James Craig Burley.
  
  This file is part of GNU Fortran.
*************** ffeintrin_fulfill_generic (ffebld *expr,
*** 1389,1395 ****
        if (!highly_specific && (nimp != FFEINTRIN_impNONE))
  	{
  	  fprintf (stderr, "lineno=%ld, gen=%s, imp=%s, timp=%s\n",
! 		   (long) lineno,
  		   ffeintrin_gens_[gen].name,
  		   ffeintrin_imps_[imp].name,
  		   ffeintrin_imps_[nimp].name);
--- 1390,1396 ----
        if (!highly_specific && (nimp != FFEINTRIN_impNONE))
  	{
  	  fprintf (stderr, "lineno=%ld, gen=%s, imp=%s, timp=%s\n",
! 		   (long) input_line,
  		   ffeintrin_gens_[gen].name,
  		   ffeintrin_imps_[imp].name,
  		   ffeintrin_imps_[nimp].name);
Index: f/lex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/lex.c,v
retrieving revision 1.35
diff -c -3 -p -r1.35 lex.c
*** f/lex.c	22 Aug 2002 02:20:42 -0000	1.35
--- f/lex.c	30 Apr 2003 16:27:22 -0000
***************
*** 1,5 ****
  /* Implementation of Fortran lexer
!    Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002
     Free Software Foundation, Inc.
     Contributed by James Craig Burley.
  
--- 1,5 ----
  /* Implementation of Fortran lexer
!    Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2003
     Free Software Foundation, Inc.
     Contributed by James Craig Burley.
  
*************** ffelex_cfelex_ (ffelexToken *xtoken, FIL
*** 788,794 ****
  }
  
  static void
! ffelex_file_pop_ (const char *input_filename)
  {
    if (input_file_stack->next)
      {
--- 788,794 ----
  }
  
  static void
! ffelex_file_pop_ (const char *filename)
  {
    if (input_file_stack->next)
      {
*************** ffelex_file_pop_ (const char *input_file
*** 796,802 ****
        input_file_stack = p->next;
        free (p);
        input_file_stack_tick++;
!       (*debug_hooks->end_source_file) (input_file_stack->line);
      }
    else
      error ("#-lines for entering and leaving files don't match");
--- 796,802 ----
        input_file_stack = p->next;
        free (p);
        input_file_stack_tick++;
!       (*debug_hooks->end_source_file) (input_file_stack->location.line);
      }
    else
      error ("#-lines for entering and leaving files don't match");
*************** ffelex_file_pop_ (const char *input_file
*** 804,830 ****
    /* Now that we've pushed or popped the input stack,
       update the name in the top element.  */
    if (input_file_stack)
!     input_file_stack->name = input_filename;
  }
  
  static void
! ffelex_file_push_ (int old_lineno, const char *input_filename)
  {
    struct file_stack *p
      = (struct file_stack *) xmalloc (sizeof (struct file_stack));
  
!   input_file_stack->line = old_lineno;
    p->next = input_file_stack;
!   p->name = input_filename;
    input_file_stack = p;
    input_file_stack_tick++;
  
!   (*debug_hooks->start_source_file) (0, input_filename);
  
    /* Now that we've pushed or popped the input stack,
       update the name in the top element.  */
    if (input_file_stack)
!     input_file_stack->name = input_filename;
  }
  
  /* Prepare to finish a statement-in-progress by sending the current
--- 804,830 ----
    /* Now that we've pushed or popped the input stack,
       update the name in the top element.  */
    if (input_file_stack)
!     input_file_stack->location.file = filename;
  }
  
  static void
! ffelex_file_push_ (int old_lineno, const char *filename)
  {
    struct file_stack *p
      = (struct file_stack *) xmalloc (sizeof (struct file_stack));
  
!   input_file_stack->location.line = old_lineno;
    p->next = input_file_stack;
!   p->location.file = filename;
    input_file_stack = p;
    input_file_stack_tick++;
  
!   (*debug_hooks->start_source_file) (0, filename);
  
    /* Now that we've pushed or popped the input stack,
       update the name in the top element.  */
    if (input_file_stack)
!     input_file_stack->location.file = filename;
  }
  
  /* Prepare to finish a statement-in-progress by sending the current
*************** ffelex_hash_ (FILE *finput)
*** 1096,1102 ****
  	      c = ffelex_get_directive_line_ (&text, finput);
  
  	      if (debug_info_level == DINFO_LEVEL_VERBOSE)
! 		(*debug_hooks->define) (lineno, text);
  
  	      goto skipline;
  	    }
--- 1096,1102 ----
  	      c = ffelex_get_directive_line_ (&text, finput);
  
  	      if (debug_info_level == DINFO_LEVEL_VERBOSE)
! 		(*debug_hooks->define) (input_line, text);
  
  	      goto skipline;
  	    }
*************** ffelex_hash_ (FILE *finput)
*** 1115,1121 ****
  	      c = ffelex_get_directive_line_ (&text, finput);
  
  	      if (debug_info_level == DINFO_LEVEL_VERBOSE)
! 		(*debug_hooks->undef) (lineno, text);
  
  	      goto skipline;
  	    }
--- 1115,1121 ----
  	      c = ffelex_get_directive_line_ (&text, finput);
  
  	      if (debug_info_level == DINFO_LEVEL_VERBOSE)
! 		(*debug_hooks->undef) (input_line, text);
  
  	      goto skipline;
  	    }
*************** ffelex_hash_ (FILE *finput)
*** 1193,1199 ****
    if ((token != NULL)
        && (ffelex_token_type (token) == FFELEX_typeNUMBER))
      {
!       int old_lineno = lineno;
        const char *old_input_filename = input_filename;
        ffewhereFile wf;
  
--- 1193,1199 ----
    if ((token != NULL)
        && (ffelex_token_type (token) == FFELEX_typeNUMBER))
      {
!       int old_lineno = input_line;
        const char *old_input_filename = input_filename;
        ffewhereFile wf;
  
*************** ffelex_hash_ (FILE *finput)
*** 1207,1213 ****
        if (c == '\n' || c == EOF)
  	{
  	  /* No more: store the line number and check following line.  */
! 	  lineno = l;
  	  if (!ffelex_kludge_flag_)
  	    {
  	      ffewhere_file_set (NULL, TRUE, (ffewhereLineNumber) l);
--- 1207,1213 ----
        if (c == '\n' || c == EOF)
  	{
  	  /* No more: store the line number and check following line.  */
! 	  input_line = l;
  	  if (!ffelex_kludge_flag_)
  	    {
  	      ffewhere_file_set (NULL, TRUE, (ffewhereLineNumber) l);
*************** ffelex_hash_ (FILE *finput)
*** 1230,1236 ****
  	  goto skipline;
  	}
  
!       lineno = l;
  
        if (ffelex_kludge_flag_)
  	input_filename = ggc_strdup (ffelex_token_text (token));
--- 1230,1236 ----
  	  goto skipline;
  	}
  
!       input_line = l;
  
        if (ffelex_kludge_flag_)
  	input_filename = ggc_strdup (ffelex_token_text (token));
*************** ffelex_hash_ (FILE *finput)
*** 1260,1266 ****
  	    {
  	      /* Update the name in the top element of input_file_stack.  */
  	      if (input_file_stack)
! 		input_file_stack->name = input_filename;
  
  	      if (token != NULL)
  		ffelex_token_kill (token);
--- 1260,1266 ----
  	    {
  	      /* Update the name in the top element of input_file_stack.  */
  	      if (input_file_stack)
! 		input_file_stack->location.file = input_filename;
  
  	      if (token != NULL)
  		ffelex_token_kill (token);
*************** ffelex_hash_ (FILE *finput)
*** 1280,1286 ****
  
  	  if (ffelex_kludge_flag_)
  	    {
! 	      lineno = 1;
  	      input_filename = old_input_filename;
  	      error ("use `#line ...' instead of `# ...' in first line");
  	    }
--- 1280,1286 ----
  
  	  if (ffelex_kludge_flag_)
  	    {
! 	      input_line = 1;
  	      input_filename = old_input_filename;
  	      error ("use `#line ...' instead of `# ...' in first line");
  	    }
*************** ffelex_hash_ (FILE *finput)
*** 1324,1330 ****
  	   || (c != '\n' && c != EOF))
  	  && ffelex_kludge_flag_)
  	{
! 	  lineno = 1;
  	  input_filename = old_input_filename;
  	  error ("use `#line ...' instead of `# ...' in first line");
  	}
--- 1324,1330 ----
  	   || (c != '\n' && c != EOF))
  	  && ffelex_kludge_flag_)
  	{
! 	  input_line = 1;
  	  input_filename = old_input_filename;
  	  error ("use `#line ...' instead of `# ...' in first line");
  	}
*************** ffelex_include_ ()
*** 1470,1476 ****
    ffewhereLineNumber linecount_current = ffelex_linecount_current_;
    ffewhereLineNumber linecount_offset
      = ffewhere_line_filelinenum (current_wl);
!   int old_lineno = lineno;
    const char *old_input_filename = input_filename;
  
    if (card_length != 0)
--- 1470,1476 ----
    ffewhereLineNumber linecount_current = ffelex_linecount_current_;
    ffewhereLineNumber linecount_offset
      = ffewhere_line_filelinenum (current_wl);
!   int old_lineno = input_line;
    const char *old_input_filename = input_filename;
  
    if (card_length != 0)
*************** ffelex_include_ ()
*** 1513,1519 ****
    ffelex_card_image_[card_length] = '\0';
  
    input_filename = old_input_filename;
!   lineno = old_lineno;
    ffelex_linecount_current_ = linecount_current;
    ffelex_current_wf_ = current_wf;
    ffelex_final_nontab_column_ = final_nontab_column;
--- 1513,1519 ----
    ffelex_card_image_[card_length] = '\0';
  
    input_filename = old_input_filename;
!   input_line = old_lineno;
    ffelex_linecount_current_ = linecount_current;
    ffelex_current_wf_ = current_wf;
    ffelex_final_nontab_column_ = final_nontab_column;
*************** ffelex_next_line_ ()
*** 1571,1577 ****
  {
    ffelex_linecount_current_ = ffelex_linecount_next_;
    ++ffelex_linecount_next_;
!   ++lineno;
  }
  
  static void
--- 1571,1577 ----
  {
    ffelex_linecount_current_ = ffelex_linecount_next_;
    ++ffelex_linecount_next_;
!   ++input_line;
  }
  
  static void
*************** ffelex_file_fixed (ffewhereFile wf, FILE
*** 1787,1793 ****
  
    assert (ffelex_handler_ != NULL);
  
!   lineno = 0;
    input_filename = ffewhere_file_name (wf);
    ffelex_current_wf_ = wf;
    disallow_continuation_line = TRUE;
--- 1787,1793 ----
  
    assert (ffelex_handler_ != NULL);
  
!   input_line = 0;
    input_filename = ffewhere_file_name (wf);
    ffelex_current_wf_ = wf;
    disallow_continuation_line = TRUE;
*************** ffelex_file_free (ffewhereFile wf, FILE 
*** 2977,2983 ****
  
    assert (ffelex_handler_ != NULL);
  
!   lineno = 0;
    input_filename = ffewhere_file_name (wf);
    ffelex_current_wf_ = wf;
    continuation_line = FALSE;
--- 2977,2983 ----
  
    assert (ffelex_handler_ != NULL);
  
!   input_line = 0;
    input_filename = ffewhere_file_name (wf);
    ffelex_current_wf_ = wf;
    continuation_line = FALSE;
Index: f/std.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/std.c,v
retrieving revision 1.17
diff -c -3 -p -r1.17 std.c
*** f/std.c	15 Mar 2003 19:17:50 -0000	1.17
--- f/std.c	30 Apr 2003 16:27:30 -0000
***************
*** 1,5 ****
  /* std.c -- Implementation File (module.c template V1.0)
!    Copyright (C) 1995, 1996, 2000, 2002 Free Software Foundation, Inc.
     Contributed by James Craig Burley.
  
  This file is part of GNU Fortran.
--- 1,5 ----
  /* std.c -- Implementation File (module.c template V1.0)
!    Copyright (C) 1995, 1996, 2000, 2002, 2003 Free Software Foundation, Inc.
     Contributed by James Craig Burley.
  
  This file is part of GNU Fortran.
*************** ffestd_exec_begin ()
*** 1423,1429 ****
  void
  ffestd_exec_end ()
  {
!   int old_lineno = lineno;
    const char *old_input_filename = input_filename;
  
    ffecom_end_transition ();
--- 1423,1429 ----
  void
  ffestd_exec_end ()
  {
!   int old_lineno = input_line;
    const char *old_input_filename = input_filename;
  
    ffecom_end_transition ();
*************** ffestd_exec_end ()
*** 1456,1462 ****
    ffestd_stmt_list_.last = NULL;
    ffestd_2pass_entrypoints_ = 0;
  
!   lineno = old_lineno;
    input_filename = old_input_filename;
  }
  
--- 1456,1462 ----
    ffestd_stmt_list_.last = NULL;
    ffestd_2pass_entrypoints_ = 0;
  
!   input_line = old_lineno;
    input_filename = old_input_filename;
  }
  
Index: f/ste.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/ste.c,v
retrieving revision 1.33
diff -c -3 -p -r1.33 ste.c
*** f/ste.c	13 Apr 2003 01:45:33 -0000	1.33
--- f/ste.c	30 Apr 2003 16:27:39 -0000
*************** static void ffeste_subr_beru_ (ffestpBer
*** 141,147 ****
  /* Internal macros. */
  
  #define ffeste_emit_line_note_() \
!   emit_line_note (input_filename, lineno)
  #define ffeste_check_simple_() \
    assert(ffeste_statelet_ == FFESTE_stateletSIMPLE_)
  #define ffeste_check_start_() \
--- 141,147 ----
  /* Internal macros. */
  
  #define ffeste_emit_line_note_() \
!   emit_line_note (input_filename, input_line)
  #define ffeste_check_simple_() \
    assert(ffeste_statelet_ == FFESTE_stateletSIMPLE_)
  #define ffeste_check_start_() \
*************** typedef struct gbe_block
*** 388,394 ****
    struct gbe_block *outer;
    ffestw block;
    int lineno;
!   const char *input_filename;
    bool is_stmt;
  } *gbe_block;
  
--- 388,394 ----
    struct gbe_block *outer;
    ffestw block;
    int lineno;
!   const char *filename;
    bool is_stmt;
  } *gbe_block;
  
*************** ffeste_start_block_ (ffestw block)
*** 401,408 ****
  
    b->outer = ffeste_top_block_;
    b->block = block;
!   b->lineno = lineno;
!   b->input_filename = input_filename;
    b->is_stmt = FALSE;
  
    ffeste_top_block_ = b;
--- 401,408 ----
  
    b->outer = ffeste_top_block_;
    b->block = block;
!   b->lineno = input_line;
!   b->filename = input_filename;
    b->is_stmt = FALSE;
  
    ffeste_top_block_ = b;
*************** ffeste_start_stmt_(void)
*** 443,450 ****
  
    b->outer = ffeste_top_block_;
    b->block = NULL;
!   b->lineno = lineno;
!   b->input_filename = input_filename;
    b->is_stmt = TRUE;
  
    ffeste_top_block_ = b;
--- 443,450 ----
  
    b->outer = ffeste_top_block_;
    b->block = NULL;
!   b->lineno = input_line;
!   b->filename = input_filename;
    b->is_stmt = TRUE;
  
    ffeste_top_block_ = b;
Index: f/ste.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/ste.h,v
retrieving revision 1.7
diff -c -3 -p -r1.7 ste.h
*** f/ste.h	17 Oct 2001 22:34:54 -0000	1.7
--- f/ste.h	30 Apr 2003 16:27:39 -0000
***************
*** 1,5 ****
  /* ste.h -- Private #include File (module.h template V1.0)
!    Copyright (C) 1995 Free Software Foundation, Inc.
     Contributed by James Craig Burley.
  
  This file is part of GNU Fortran.
--- 1,5 ----
  /* ste.h -- Private #include File (module.h template V1.0)
!    Copyright (C) 1995, 2003 Free Software Foundation, Inc.
     Contributed by James Craig Burley.
  
  This file is part of GNU Fortran.
*************** void ffeste_V026 (ffestpFindStmt *info);
*** 148,156 ****
  #define ffeste_init_3()
  #define ffeste_init_4()
  #define ffeste_filename() input_filename
! #define ffeste_filelinenum() lineno
  #define ffeste_set_line(name,num) \
!   (input_filename = (name), lineno = (num))
  #define ffeste_terminate_0()
  #define ffeste_terminate_1()
  #ifdef ENABLE_CHECKING
--- 148,156 ----
  #define ffeste_init_3()
  #define ffeste_init_4()
  #define ffeste_filename() input_filename
! #define ffeste_filelinenum() input_line
  #define ffeste_set_line(name,num) \
!   (input_filename = (name), input_line = (num))
  #define ffeste_terminate_0()
  #define ffeste_terminate_1()
  #ifdef ENABLE_CHECKING
Index: java/check-init.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/check-init.c,v
retrieving revision 1.48
diff -c -3 -p -r1.48 check-init.c
*** java/check-init.c	18 Jan 2003 22:15:50 -0000	1.48
--- java/check-init.c	30 Apr 2003 16:27:42 -0000
*************** check_init (tree exp, words before)
*** 890,904 ****
  	const char *saved_input_filename = input_filename;
  	tree saved_wfl = wfl;
  	tree body = EXPR_WFL_NODE (exp);
! 	int saved_lineno = lineno;
  	if (body == empty_stmt_node)
  	  break;
  	wfl = exp;
  	input_filename = EXPR_WFL_FILENAME (exp);
! 	lineno = EXPR_WFL_LINENO (exp);
  	check_init (body, before);
  	input_filename = saved_input_filename;
! 	lineno = saved_lineno;
  	wfl = saved_wfl;
        }
        break;
--- 890,904 ----
  	const char *saved_input_filename = input_filename;
  	tree saved_wfl = wfl;
  	tree body = EXPR_WFL_NODE (exp);
! 	int saved_lineno = input_line;
  	if (body == empty_stmt_node)
  	  break;
  	wfl = exp;
  	input_filename = EXPR_WFL_FILENAME (exp);
! 	input_line = EXPR_WFL_LINENO (exp);
  	check_init (body, before);
  	input_filename = saved_input_filename;
! 	input_line = saved_lineno;
  	wfl = saved_wfl;
        }
        break;
Index: java/class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.155
diff -c -3 -p -r1.155 class.c
*** java/class.c	13 Apr 2003 01:45:34 -0000	1.155
--- java/class.c	30 Apr 2003 16:27:47 -0000
*************** push_class (tree class_type, tree class_
*** 309,326 ****
  {
    tree decl, signature;
    const char *save_input_filename = input_filename;
!   int save_lineno = lineno;
    tree source_name = identifier_subst (class_name, "", '.', '/', ".java");
    CLASS_P (class_type) = 1;
    input_filename = IDENTIFIER_POINTER (source_name);
!   lineno = 0;
    decl = build_decl (TYPE_DECL, class_name, class_type);
  
    /* dbxout needs a DECL_SIZE if in gstabs mode */
    DECL_SIZE (decl) = integer_zero_node;
  
    input_filename = save_input_filename;
!   lineno = save_lineno;
    signature = identifier_subst (class_name, "L", '.', '/', ";");
    IDENTIFIER_SIGNATURE_TYPE (signature) = build_pointer_type (class_type);
  
--- 309,326 ----
  {
    tree decl, signature;
    const char *save_input_filename = input_filename;
!   int save_lineno = input_line;
    tree source_name = identifier_subst (class_name, "", '.', '/', ".java");
    CLASS_P (class_type) = 1;
    input_filename = IDENTIFIER_POINTER (source_name);
!   input_line = 0;
    decl = build_decl (TYPE_DECL, class_name, class_type);
  
    /* dbxout needs a DECL_SIZE if in gstabs mode */
    DECL_SIZE (decl) = integer_zero_node;
  
    input_filename = save_input_filename;
!   input_line = save_lineno;
    signature = identifier_subst (class_name, "L", '.', '/', ";");
    IDENTIFIER_SIGNATURE_TYPE (signature) = build_pointer_type (class_type);
  
Index: java/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/decl.c,v
retrieving revision 1.151
diff -c -3 -p -r1.151 decl.c
*** java/decl.c	26 Feb 2003 03:02:14 -0000	1.151
--- java/decl.c	30 Apr 2003 16:27:51 -0000
*************** complete_start_java_method (tree fndecl)
*** 1670,1676 ****
    if (! flag_emit_class_files)
      {
        /* Initialize the RTL code for the function.  */
!       init_function_start (fndecl, input_filename, lineno);
  
        /* Set up parameters and prepare for return, for the function.  */
        expand_function_start (fndecl, 0);
--- 1670,1676 ----
    if (! flag_emit_class_files)
      {
        /* Initialize the RTL code for the function.  */
!       init_function_start (fndecl, input_filename, input_line);
  
        /* Set up parameters and prepare for return, for the function.  */
        expand_function_start (fndecl, 0);
*************** end_java_method (void)
*** 1810,1816 ****
    BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl;
  
    /* Generate rtl for function exit.  */
!   expand_function_end (input_filename, lineno, 0);
  
    /* Run the optimizers and output assembler code for this function. */
    rest_of_compilation (fndecl);
--- 1810,1816 ----
    BLOCK_SUPERCONTEXT (DECL_INITIAL (fndecl)) = fndecl;
  
    /* Generate rtl for function exit.  */
!   expand_function_end (input_filename, input_line, 0);
  
    /* Run the optimizers and output assembler code for this function. */
    rest_of_compilation (fndecl);
Index: java/expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.164
diff -c -3 -p -r1.164 expr.c
*** java/expr.c	11 Mar 2003 20:37:02 -0000	1.164
--- java/expr.c	30 Apr 2003 16:27:59 -0000
*************** expand_byte_code (JCF *jcf, tree method)
*** 2827,2834 ****
  	      linenumber_pointer += 4;
  	      if (pc == PC)
  		{
! 		  lineno = GET_u2 (linenumber_pointer - 2);
! 		  emit_line_note (input_filename, lineno);
  		  if (!(instruction_bits[PC] & BCODE_HAS_MULTI_LINENUMBERS))
  		    break;
  		}
--- 2827,2834 ----
  	      linenumber_pointer += 4;
  	      if (pc == PC)
  		{
! 		  input_line = GET_u2 (linenumber_pointer - 2);
! 		  emit_line_note (input_filename, input_line);
  		  if (!(instruction_bits[PC] & BCODE_HAS_MULTI_LINENUMBERS))
  		    break;
  		}
Index: java/jcf-parse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/jcf-parse.c,v
retrieving revision 1.138
diff -c -3 -p -r1.138 jcf-parse.c
*** java/jcf-parse.c	24 Feb 2003 02:14:48 -0000	1.138
--- java/jcf-parse.c	30 Apr 2003 16:28:01 -0000
*************** give_name_to_class (JCF *jcf, int i)
*** 418,424 ****
  					    JPOOL_UTF_LENGTH (jcf, j));
        this_class = lookup_class (class_name);
        input_filename = DECL_SOURCE_FILE (TYPE_NAME (this_class));
!       lineno = 0;
        if (main_input_filename == NULL && jcf == main_jcf)
  	main_input_filename = input_filename;
  
--- 418,424 ----
  					    JPOOL_UTF_LENGTH (jcf, j));
        this_class = lookup_class (class_name);
        input_filename = DECL_SOURCE_FILE (TYPE_NAME (this_class));
!       input_line = 0;
        if (main_input_filename == NULL && jcf == main_jcf)
  	main_input_filename = input_filename;
  
*************** parse_class_file (void)
*** 703,715 ****
  {
    tree method, field;
    const char *save_input_filename = input_filename;
!   int save_lineno = lineno;
  
    java_layout_seen_class_methods ();
  
    input_filename = DECL_SOURCE_FILE (TYPE_NAME (current_class));
!   lineno = 0;
!   (*debug_hooks->start_source_file) (lineno, input_filename);
    init_outgoing_cpool ();
  
    /* Currently we always have to emit calls to _Jv_InitClass when
--- 703,715 ----
  {
    tree method, field;
    const char *save_input_filename = input_filename;
!   int save_lineno = input_line;
  
    java_layout_seen_class_methods ();
  
    input_filename = DECL_SOURCE_FILE (TYPE_NAME (current_class));
!   input_line = 0;
!   (*debug_hooks->start_source_file) (input_line, input_filename);
    init_outgoing_cpool ();
  
    /* Currently we always have to emit calls to _Jv_InitClass when
*************** parse_class_file (void)
*** 760,766 ****
  	  continue;
  	}
  
!       lineno = 0;
        if (DECL_LINENUMBERS_OFFSET (method))
  	{
  	  register int i;
--- 760,766 ----
  	  continue;
  	}
  
!       input_line = 0;
        if (DECL_LINENUMBERS_OFFSET (method))
  	{
  	  register int i;
*************** parse_class_file (void)
*** 774,781 ****
  	      int line = GET_u2 (ptr);
  	      /* Set initial lineno lineno to smallest linenumber.
  	       * Needs to be set before init_function_start. */
! 	      if (lineno == 0 || line < lineno)
! 		lineno = line;
  	    }  
  	}
        else
--- 774,781 ----
  	      int line = GET_u2 (ptr);
  	      /* Set initial lineno lineno to smallest linenumber.
  	       * Needs to be set before init_function_start. */
! 	      if (input_line == 0 || line < input_line)
! 		input_line = line;
  	    }  
  	}
        else
*************** parse_class_file (void)
*** 803,809 ****
  
    (*debug_hooks->end_source_file) (save_lineno);
    input_filename = save_input_filename;
!   lineno = save_lineno;
  }
  
  /* Parse a source file, as pointed by the current value of INPUT_FILENAME. */
--- 803,809 ----
  
    (*debug_hooks->end_source_file) (save_lineno);
    input_filename = save_input_filename;
!   input_line = save_lineno;
  }
  
  /* Parse a source file, as pointed by the current value of INPUT_FILENAME. */
Index: java/jcf-write.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/jcf-write.c,v
retrieving revision 1.124
diff -c -3 -p -r1.124 jcf-write.c
*** java/jcf-write.c	10 Apr 2003 18:24:42 -0000	1.124
--- java/jcf-write.c	30 Apr 2003 16:28:08 -0000
*************** generate_bytecode_insns (tree exp, int t
*** 1425,1441 ****
        {
  	const char *saved_input_filename = input_filename;
  	tree body = EXPR_WFL_NODE (exp);
! 	int saved_lineno = lineno;
  	if (body == empty_stmt_node)
  	  break;
  	input_filename = EXPR_WFL_FILENAME (exp);
! 	lineno = EXPR_WFL_LINENO (exp);
! 	if (EXPR_WFL_EMIT_LINE_NOTE (exp) && lineno > 0
  	    && debug_info_level > DINFO_LEVEL_NONE)
! 	  put_linenumber (lineno, state);
  	generate_bytecode_insns (body, target, state);
  	input_filename = saved_input_filename;
! 	lineno = saved_lineno;
        }
        break;
      case INTEGER_CST:
--- 1425,1441 ----
        {
  	const char *saved_input_filename = input_filename;
  	tree body = EXPR_WFL_NODE (exp);
! 	int saved_lineno = input_line;
  	if (body == empty_stmt_node)
  	  break;
  	input_filename = EXPR_WFL_FILENAME (exp);
! 	input_line = EXPR_WFL_LINENO (exp);
! 	if (EXPR_WFL_EMIT_LINE_NOTE (exp) && input_line > 0
  	    && debug_info_level > DINFO_LEVEL_NONE)
! 	  put_linenumber (input_line, state);
  	generate_bytecode_insns (body, target, state);
  	input_filename = saved_input_filename;
! 	input_line = saved_lineno;
        }
        break;
      case INTEGER_CST:
Index: java/lex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/lex.c,v
retrieving revision 1.104
diff -c -3 -p -r1.104 lex.c
*** java/lex.c	19 Mar 2003 17:02:43 -0000	1.104
--- java/lex.c	30 Apr 2003 16:28:12 -0000
*************** java_init_lex (FILE *finput, const char 
*** 135,141 ****
  #endif
  
    ctxp->filename = input_filename;
!   ctxp->lineno = lineno = 0;
    ctxp->p_line = NULL;
    ctxp->c_line = NULL;
    ctxp->java_error_flag = 0;
--- 135,141 ----
  #endif
  
    ctxp->filename = input_filename;
!   ctxp->lineno = input_line = 0;
    ctxp->p_line = NULL;
    ctxp->c_line = NULL;
    ctxp->java_error_flag = 0;
*************** java_allocate_new_line (void)
*** 212,218 ****
      }
    ctxp->c_line->ahead [0] = 0;
    ctxp->c_line->unicode_escape_ahead_p = 0;
!   ctxp->c_line->lineno = ++lineno;
    ctxp->c_line->white_space_only = 1;
  }
  
--- 212,218 ----
      }
    ctxp->c_line->ahead [0] = 0;
    ctxp->c_line->unicode_escape_ahead_p = 0;
!   ctxp->c_line->lineno = ++input_line;
    ctxp->c_line->white_space_only = 1;
  }
  
*************** do_java_lex (YYSTYPE *java_lval)
*** 1351,1359 ****
  	}
        if (c == '\n' || c == UEOF) /* ULT.  */
  	{
! 	  lineno--;	/* Refer to the line where the terminator was seen.  */
  	  java_lex_error ("String not terminated at end of line", 0);
! 	  lineno++;
  	}
  
        obstack_1grow (&temporary_obstack, '\0');
--- 1351,1359 ----
  	}
        if (c == '\n' || c == UEOF) /* ULT.  */
  	{
! 	  input_line--;	/* Refer to the line where the terminator was seen.  */
  	  java_lex_error ("String not terminated at end of line", 0);
! 	  input_line++;
  	}
  
        obstack_1grow (&temporary_obstack, '\0');
*************** do_java_lex (YYSTYPE *java_lval)
*** 1381,1394 ****
      case '{':
        JAVA_LEX_SEP (c);
        if (ctxp->ccb_indent == 1)
! 	ctxp->first_ccb_indent1 = lineno;
        ctxp->ccb_indent++;
        BUILD_OPERATOR (OCB_TK);
      case '}':
        JAVA_LEX_SEP (c);
        ctxp->ccb_indent--;
        if (ctxp->ccb_indent == 1)
!         ctxp->last_ccb_indent1 = lineno;
        BUILD_OPERATOR (CCB_TK);
      case '[':
        JAVA_LEX_SEP (c);
--- 1381,1394 ----
      case '{':
        JAVA_LEX_SEP (c);
        if (ctxp->ccb_indent == 1)
! 	ctxp->first_ccb_indent1 = input_line;
        ctxp->ccb_indent++;
        BUILD_OPERATOR (OCB_TK);
      case '}':
        JAVA_LEX_SEP (c);
        ctxp->ccb_indent--;
        if (ctxp->ccb_indent == 1)
!         ctxp->last_ccb_indent1 = input_line;
        BUILD_OPERATOR (CCB_TK);
      case '[':
        JAVA_LEX_SEP (c);
Index: java/lex.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/lex.h,v
retrieving revision 1.32
diff -c -3 -p -r1.32 lex.h
*** java/lex.h	10 Jan 2003 02:22:26 -0000	1.32
--- java/lex.h	30 Apr 2003 16:28:12 -0000
*************** The Free Software Foundation is independ
*** 29,35 ****
  
  /* Extern global variables declarations  */
  extern FILE *finput;
- extern int   lineno;
  
  /* A Unicode character, as read from the input file  */
  typedef unsigned short unicode_t;
--- 29,34 ----
Index: java/parse-scan.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse-scan.y,v
retrieving revision 1.30
diff -c -3 -p -r1.30 parse-scan.y
*** java/parse-scan.y	6 Apr 2003 21:44:09 -0000	1.30
--- java/parse-scan.y	30 Apr 2003 16:28:14 -0000
*************** definitions and other extensions.  */
*** 41,52 ****
  #include "system.h"
  #include "coretypes.h"
  #include "tm.h"
! 
  #include "obstack.h"
  #include "toplev.h"
  
- extern char *input_filename;
  extern FILE *finput, *out;
  
  /* Obstack for the lexer.  */
  struct obstack temporary_obstack;
--- 41,55 ----
  #include "system.h"
  #include "coretypes.h"
  #include "tm.h"
! #include "input.h"
  #include "obstack.h"
  #include "toplev.h"
  
  extern FILE *finput, *out;
+  
+ /* Current position in real source file.  */
+ 
+ location_t input_location;
  
  /* Obstack for the lexer.  */
  struct obstack temporary_obstack;
*************** struct obstack temporary_obstack;
*** 54,64 ****
  /* The current parser context.  */
  static struct parser_ctxt *ctxp;
  
! /* Error and warning counts, current line number, because they're used
!    elsewhere  */
  int java_error_count;
  int java_warning_count;
- int lineno;
  
  /* Tweak default rules when necessary.  */
  static int absorber;
--- 57,65 ----
  /* The current parser context.  */
  static struct parser_ctxt *ctxp;
  
! /* Error and warning counts, because they're used elsewhere  */
  int java_error_count;
  int java_warning_count;
  
  /* Tweak default rules when necessary.  */
  static int absorber;
*************** void reset_report (void)
*** 1354,1359 ****
  void
  yyerror (const char *msg ATTRIBUTE_UNUSED)
  {
!   fprintf (stderr, "%s: %d: %s\n", input_filename, lineno, msg);
    exit (1);
  }
--- 1355,1360 ----
  void
  yyerror (const char *msg ATTRIBUTE_UNUSED)
  {
!   fprintf (stderr, "%s: %d: %s\n", input_filename, input_line, msg);
    exit (1);
  }
Index: java/parse.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.h,v
retrieving revision 1.89
diff -c -3 -p -r1.89 parse.h
*** java/parse.h	24 Feb 2003 02:14:49 -0000	1.89
--- java/parse.h	30 Apr 2003 16:28:17 -0000
*************** extern tree stabilize_reference (tree);
*** 70,76 ****
  #define RECOVER     {yyerrok; RECOVERED;}
  
  #define YYERROR_NOW ctxp->java_error_flag = 1
! #define YYNOT_TWICE if (ctxp->prevent_ese != lineno)
  
  /* Accepted modifiers */
  #define CLASS_MODIFIERS ACC_PUBLIC|ACC_ABSTRACT|ACC_FINAL|ACC_STRICT
--- 70,76 ----
  #define RECOVER     {yyerrok; RECOVERED;}
  
  #define YYERROR_NOW ctxp->java_error_flag = 1
! #define YYNOT_TWICE if (ctxp->prevent_ese != input_line)
  
  /* Accepted modifiers */
  #define CLASS_MODIFIERS ACC_PUBLIC|ACC_ABSTRACT|ACC_FINAL|ACC_STRICT
Index: java/parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.429
diff -c -3 -p -r1.429 parse.y
*** java/parse.y	13 Apr 2003 01:45:34 -0000	1.429
--- java/parse.y	30 Apr 2003 16:28:51 -0000
*************** empty_statement:
*** 1452,1458 ****
  			   (DECL_CONTEXT (current_function_decl)))))
  
  		    {
! 		      EXPR_WFL_SET_LINECOL (wfl_operator, lineno, -1);
  		      parse_warning_context (wfl_operator, "An empty declaration is a deprecated feature that should not be used");
  		    }
  		  $$ = empty_stmt_node;
--- 1452,1458 ----
  			   (DECL_CONTEXT (current_function_decl)))))
  
  		    {
! 		      EXPR_WFL_SET_LINECOL (wfl_operator, input_line, -1);
  		      parse_warning_context (wfl_operator, "An empty declaration is a deprecated feature that should not be used");
  		    }
  		  $$ = empty_stmt_node;
*************** expression_statement:
*** 1489,1495 ****
  		{
  		  /* We have a statement. Generate a WFL around it so
  		     we can debug it */
! 		  $$ = build_expr_wfl ($1, input_filename, lineno, 0);
  		  /* We know we have a statement, so set the debug
                       info to be eventually generate here. */
  		  $$ = JAVA_MAYBE_GENERATE_DEBUG_INFO ($$);
--- 1489,1495 ----
  		{
  		  /* We have a statement. Generate a WFL around it so
  		     we can debug it */
! 		  $$ = build_expr_wfl ($1, input_filename, input_line, 0);
  		  /* We know we have a statement, so set the debug
                       info to be eventually generate here. */
  		  $$ = JAVA_MAYBE_GENERATE_DEBUG_INFO ($$);
*************** java_pop_parser_context (int generate)
*** 2692,2698 ****
    next = ctxp->next;
    if (next)
      {
!       lineno = ctxp->lineno;
        current_class = ctxp->class_type;
      }
  
--- 2692,2698 ----
    next = ctxp->next;
    if (next)
      {
!       input_line = ctxp->lineno;
        current_class = ctxp->class_type;
      }
  
*************** java_parser_context_save_global (void)
*** 2737,2743 ****
    else if (ctxp->saved_data)
      create_new_parser_context (1);
  
!   ctxp->lineno = lineno;
    ctxp->class_type = current_class;
    ctxp->filename = input_filename;
    ctxp->function_decl = current_function_decl;
--- 2737,2743 ----
    else if (ctxp->saved_data)
      create_new_parser_context (1);
  
!   ctxp->lineno = input_line;
    ctxp->class_type = current_class;
    ctxp->filename = input_filename;
    ctxp->function_decl = current_function_decl;
*************** java_parser_context_save_global (void)
*** 2750,2756 ****
  void
  java_parser_context_restore_global (void)
  {
!   lineno = ctxp->lineno;
    current_class = ctxp->class_type;
    input_filename = ctxp->filename;
    if (wfl_operator)
--- 2750,2756 ----
  void
  java_parser_context_restore_global (void)
  {
!   input_line = ctxp->lineno;
    current_class = ctxp->class_type;
    input_filename = ctxp->filename;
    if (wfl_operator)
*************** yyerror (const char *msg)
*** 2989,2995 ****
    int save_lineno;
    char *remainder, *code_from_source;
  
!   if (!force_error && prev_lineno == lineno)
      return;
  
    /* Save current error location but report latter, when the context is
--- 2989,2995 ----
    int save_lineno;
    char *remainder, *code_from_source;
  
!   if (!force_error && prev_lineno == input_line)
      return;
  
    /* Save current error location but report latter, when the context is
*************** yyerror (const char *msg)
*** 3022,3029 ****
        elc.line = ctxp->p_line->lineno;
      }
  
!   save_lineno = lineno;
!   prev_lineno = lineno = elc.line;
    prev_msg = msg;
  
    code_from_source = java_get_line_col (ctxp->filename, elc.line, elc.col);
--- 3022,3029 ----
        elc.line = ctxp->p_line->lineno;
      }
  
!   save_lineno = input_line;
!   prev_lineno = input_line = elc.line;
    prev_msg = msg;
  
    code_from_source = java_get_line_col (ctxp->filename, elc.line, elc.col);
*************** yyerror (const char *msg)
*** 3040,3046 ****
       the same line. This occurs when we report an error but don't have
       a synchronization point other than ';', which
       expression_statement is the only one to take care of.  */
!   ctxp->prevent_ese = lineno = save_lineno;
  }
  
  static void
--- 3040,3046 ----
       the same line. This occurs when we report an error but don't have
       a synchronization point other than ';', which
       expression_statement is the only one to take care of.  */
!   ctxp->prevent_ese = input_line = save_lineno;
  }
  
  static void
*************** register_fields (int flags, tree type, t
*** 4225,4231 ****
  {
    tree current, saved_type;
    tree class_type = NULL_TREE;
!   int saved_lineno = lineno;
    int must_chain = 0;
    tree wfl = NULL_TREE;
  
--- 4225,4231 ----
  {
    tree current, saved_type;
    tree class_type = NULL_TREE;
!   int saved_lineno = input_line;
    int must_chain = 0;
    tree wfl = NULL_TREE;
  
*************** register_fields (int flags, tree type, t
*** 4295,4303 ****
        /* Set lineno to the line the field was found and create a
           declaration for it. Eventually sets the @deprecated tag flag. */
        if (flag_emit_xref)
! 	lineno = EXPR_WFL_LINECOL (cl);
        else
! 	lineno = EXPR_WFL_LINENO (cl);
        field_decl = add_field (class_type, current_name, real_type, flags);
        CHECK_DEPRECATED_NO_RESET (field_decl);
  
--- 4295,4303 ----
        /* Set lineno to the line the field was found and create a
           declaration for it. Eventually sets the @deprecated tag flag. */
        if (flag_emit_xref)
! 	input_line = EXPR_WFL_LINECOL (cl);
        else
! 	input_line = EXPR_WFL_LINENO (cl);
        field_decl = add_field (class_type, current_name, real_type, flags);
        CHECK_DEPRECATED_NO_RESET (field_decl);
  
*************** register_fields (int flags, tree type, t
*** 4359,4365 ****
      }
  
    CLEAR_DEPRECATED;
!   lineno = saved_lineno;
  }
  
  /* Generate finit$, using the list of initialized fields to populate
--- 4359,4365 ----
      }
  
    CLEAR_DEPRECATED;
!   input_line = saved_lineno;
  }
  
  /* Generate finit$, using the list of initialized fields to populate
*************** method_header (int flags, tree type, tre
*** 4611,4621 ****
    else
      TREE_TYPE (meth) = type;
  
!   saved_lineno = lineno;
    /* When defining an abstract or interface method, the curly
       bracket at level 1 doesn't exist because there is no function
       body */
!   lineno = (ctxp->first_ccb_indent1 ? ctxp->first_ccb_indent1 :
  	    EXPR_WFL_LINENO (id));
  
    /* Remember the original argument list */
--- 4611,4621 ----
    else
      TREE_TYPE (meth) = type;
  
!   saved_lineno = input_line;
    /* When defining an abstract or interface method, the curly
       bracket at level 1 doesn't exist because there is no function
       body */
!   input_line = (ctxp->first_ccb_indent1 ? ctxp->first_ccb_indent1 :
  	    EXPR_WFL_LINENO (id));
  
    /* Remember the original argument list */
*************** method_header (int flags, tree type, tre
*** 4649,4655 ****
    /* Register the parameter number and re-install the current line
       number */
    DECL_MAX_LOCALS (meth) = ctxp->formal_parameter_number+1;
!   lineno = saved_lineno;
  
    /* Register exception specified by the `throws' keyword for
       resolution and set the method decl appropriate field to the list.
--- 4649,4655 ----
    /* Register the parameter number and re-install the current line
       number */
    DECL_MAX_LOCALS (meth) = ctxp->formal_parameter_number+1;
!   input_line = saved_lineno;
  
    /* Register exception specified by the `throws' keyword for
       resolution and set the method decl appropriate field to the list.
*************** safe_layout_class (tree class)
*** 5451,5463 ****
  {
    tree save_current_class = current_class;
    const char *save_input_filename = input_filename;
!   int save_lineno = lineno;
  
    layout_class (class);
  
    current_class = save_current_class;
    input_filename = save_input_filename;
!   lineno = save_lineno;
  }
  
  static tree
--- 5451,5463 ----
  {
    tree save_current_class = current_class;
    const char *save_input_filename = input_filename;
!   int save_lineno = input_line;
  
    layout_class (class);
  
    current_class = save_current_class;
    input_filename = save_input_filename;
!   input_line = save_lineno;
  }
  
  static tree
*************** find_in_imports_on_demand (tree enclosin
*** 6867,6873 ****
  
    for (; import; import = TREE_CHAIN (import))
      {
!       int saved_lineno = lineno;
        int access_check;
        const char *id_name;
        tree decl, type_name_copy;
--- 6867,6873 ----
  
    for (; import; import = TREE_CHAIN (import))
      {
!       int saved_lineno = input_line;
        int access_check;
        const char *id_name;
        tree decl, type_name_copy;
*************** find_in_imports_on_demand (tree enclosin
*** 6886,6892 ****
  
        /* Setup lineno so that it refers to the line of the import (in
  	 case we parse a class file and encounter errors */
!       lineno = EXPR_WFL_LINENO (TREE_PURPOSE (import));
  
        type_name_copy = TYPE_NAME (class_type);
        TYPE_NAME (class_type) = node;
--- 6886,6892 ----
  
        /* Setup lineno so that it refers to the line of the import (in
  	 case we parse a class file and encounter errors */
!       input_line = EXPR_WFL_LINENO (TREE_PURPOSE (import));
  
        type_name_copy = TYPE_NAME (class_type);
        TYPE_NAME (class_type) = node;
*************** find_in_imports_on_demand (tree enclosin
*** 6908,6914 ****
  	/* 6.6.1: Inner classes are subject to member access rules. */
  	access_check = 0;
  
!       lineno = saved_lineno;
  
        /* If the loaded class is not accessible or couldn't be loaded,
  	 we restore the original TYPE_NAME and process the next
--- 6908,6914 ----
  	/* 6.6.1: Inner classes are subject to member access rules. */
  	access_check = 0;
  
!       input_line = saved_lineno;
  
        /* If the loaded class is not accessible or couldn't be loaded,
  	 we restore the original TYPE_NAME and process the next
*************** create_artificial_method (tree class, in
*** 7297,7303 ****
    tree mdecl;
  
    java_parser_context_save_global ();
!   lineno = 0;
    mdecl = make_node (FUNCTION_TYPE);
    TREE_TYPE (mdecl) = type;
    TYPE_ARG_TYPES (mdecl) = args;
--- 7297,7303 ----
    tree mdecl;
  
    java_parser_context_save_global ();
!   input_line = 0;
    mdecl = make_node (FUNCTION_TYPE);
    TREE_TYPE (mdecl) = type;
    TYPE_ARG_TYPES (mdecl) = args;
*************** source_end_java_method (void)
*** 7357,7363 ****
      return;
  
    java_parser_context_save_global ();
!   lineno = ctxp->last_ccb_indent1;
  
    /* Turn function bodies with only a NOP expr null, so they don't get
       generated at all and we won't get warnings when using the -W
--- 7357,7363 ----
      return;
  
    java_parser_context_save_global ();
!   input_line = ctxp->last_ccb_indent1;
  
    /* Turn function bodies with only a NOP expr null, so they don't get
       generated at all and we won't get warnings when using the -W
*************** source_end_java_method (void)
*** 7385,7392 ****
    /* Generate rtl for function exit.  */
    if (! flag_emit_class_files && ! flag_emit_xref)
      {
!       lineno = DECL_SOURCE_LINE_LAST (fndecl);
!       expand_function_end (input_filename, lineno, 0);
  
        DECL_SOURCE_LINE (fndecl) = DECL_SOURCE_LINE_FIRST (fndecl);
  
--- 7385,7392 ----
    /* Generate rtl for function exit.  */
    if (! flag_emit_class_files && ! flag_emit_xref)
      {
!       input_line = DECL_SOURCE_LINE_LAST (fndecl);
!       expand_function_end (input_filename, input_line, 0);
  
        DECL_SOURCE_LINE (fndecl) = DECL_SOURCE_LINE_FIRST (fndecl);
  
*************** start_complete_expand_method (tree mdecl
*** 7894,7900 ****
        TREE_CHAIN (tem) = next;
      }
    pushdecl_force_head (DECL_ARGUMENTS (mdecl));
!   lineno = DECL_SOURCE_LINE_FIRST (mdecl);
    build_result_decl (mdecl);
  }
  
--- 7894,7900 ----
        TREE_CHAIN (tem) = next;
      }
    pushdecl_force_head (DECL_ARGUMENTS (mdecl));
!   input_line = DECL_SOURCE_LINE_FIRST (mdecl);
    build_result_decl (mdecl);
  }
  
*************** build_thisn_assign (void)
*** 8572,8578 ****
        tree lhs = make_qualified_primary (build_wfl_node (this_identifier_node),
  					 build_wfl_node (thisn), 0);
        tree rhs = build_wfl_node (thisn);
!       EXPR_WFL_SET_LINECOL (lhs, lineno, 0);
        return build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (lhs), lhs, rhs);
      }
    return NULL_TREE;
--- 8572,8578 ----
        tree lhs = make_qualified_primary (build_wfl_node (this_identifier_node),
  					 build_wfl_node (thisn), 0);
        tree rhs = build_wfl_node (thisn);
!       EXPR_WFL_SET_LINECOL (lhs, input_line, 0);
        return build_assignment (ASSIGN_TK, EXPR_WFL_LINECOL (lhs), lhs, rhs);
      }
    return NULL_TREE;
*************** java_complete_lhs (tree node)
*** 11824,11833 ****
        else
  	{
  	  tree body;
! 	  int save_lineno = lineno;
! 	  lineno = EXPR_WFL_LINENO (node);
  	  body = java_complete_tree (EXPR_WFL_NODE (node));
! 	  lineno = save_lineno;
  	  EXPR_WFL_NODE (node) = body;
  	  TREE_SIDE_EFFECTS (node) = TREE_SIDE_EFFECTS (body);
  	  CAN_COMPLETE_NORMALLY (node) = CAN_COMPLETE_NORMALLY (body);
--- 11824,11833 ----
        else
  	{
  	  tree body;
! 	  int save_lineno = input_line;
! 	  input_line = EXPR_WFL_LINENO (node);
  	  body = java_complete_tree (EXPR_WFL_NODE (node));
! 	  input_line = save_lineno;
  	  EXPR_WFL_NODE (node) = body;
  	  TREE_SIDE_EFFECTS (node) = TREE_SIDE_EFFECTS (body);
  	  CAN_COMPLETE_NORMALLY (node) = CAN_COMPLETE_NORMALLY (body);
*************** maybe_absorb_scoping_blocks (void)
*** 12375,12381 ****
      {
        tree b = exit_block ();
        java_method_add_stmt (current_function_decl, b);
!       SOURCE_FRONTEND_DEBUG (("Absorbing scoping block at line %d", lineno));
      }
  }
  
--- 12375,12381 ----
      {
        tree b = exit_block ();
        java_method_add_stmt (current_function_decl, b);
!       SOURCE_FRONTEND_DEBUG (("Absorbing scoping block at line %d", input_line));
      }
  }
  
Index: objc/objc-act.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/objc/objc-act.c,v
retrieving revision 1.170
diff -c -3 -p -r1.170 objc-act.c
*** objc/objc-act.c	13 Apr 2003 01:45:35 -0000	1.170
--- objc/objc-act.c	30 Apr 2003 16:29:08 -0000
*************** objc_init ()
*** 441,447 ****
    /* Force the line number back to 0; check_newline will have
       raised it to 1, which will make the builtin functions appear
       not to be built in.  */
!   lineno = 0;
  
    /* If gen_declaration desired, open the output file.  */
    if (flag_gen_declaration)
--- 441,447 ----
    /* Force the line number back to 0; check_newline will have
       raised it to 1, which will make the builtin functions appear
       not to be built in.  */
!   input_line = 0;
  
    /* If gen_declaration desired, open the output file.  */
    if (flag_gen_declaration)
*************** build_module_descriptor ()
*** 1697,1720 ****
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]);
    field_decl = get_identifier ("version");
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    /* long  size; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]);
    field_decl = get_identifier ("size");
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* char  *name; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("name"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_symtab *symtab; */
--- 1697,1720 ----
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]);
    field_decl = get_identifier ("version");
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    /* long  size; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]);
    field_decl = get_identifier ("size");
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* char  *name; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("name"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_symtab *symtab; */
*************** build_module_descriptor ()
*** 1722,1729 ****
    decl_specs = get_identifier (UTAG_SYMTAB);
    decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, decl_specs));
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("symtab"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    finish_struct (objc_module_template, field_decl_chain, NULL_TREE);
--- 1722,1729 ----
    decl_specs = get_identifier (UTAG_SYMTAB);
    decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, decl_specs));
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("symtab"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    finish_struct (objc_module_template, field_decl_chain, NULL_TREE);
*************** build_selector_translation_table ()
*** 2049,2060 ****
          if (!found)
            {
              /* Adjust line number for warning message.  */
!             int save_lineno = lineno;
              if (flag_next_runtime && TREE_PURPOSE (chain))
!               lineno = DECL_SOURCE_LINE (TREE_PURPOSE (chain));
              warning ("creating selector for non existant method %s",
                       IDENTIFIER_POINTER (TREE_VALUE (chain)));
!             lineno = save_lineno;
            }
        }
  
--- 2049,2060 ----
          if (!found)
            {
              /* Adjust line number for warning message.  */
!             int save_lineno = input_line;
              if (flag_next_runtime && TREE_PURPOSE (chain))
!               input_line = DECL_SOURCE_LINE (TREE_PURPOSE (chain));
              warning ("creating selector for non existant method %s",
                       IDENTIFIER_POINTER (TREE_VALUE (chain)));
!             input_line = save_lineno;
            }
        }
  
*************** build_protocol_template ()
*** 2565,2572 ****
    decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE,
  					get_identifier (UTAG_CLASS)));
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("isa"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    /* char *protocol_name; */
--- 2565,2572 ----
    decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE,
  					get_identifier (UTAG_CLASS)));
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("isa"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    /* char *protocol_name; */
*************** build_protocol_template ()
*** 2574,2581 ****
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_name"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_protocol **protocol_list; */
--- 2574,2581 ----
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_name"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_protocol **protocol_list; */
*************** build_protocol_template ()
*** 2584,2591 ****
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_list"));
    field_decl = build1 (INDIRECT_REF, NULL_TREE, field_decl);
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_method_list *instance_methods; */
--- 2584,2591 ----
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_list"));
    field_decl = build1 (INDIRECT_REF, NULL_TREE, field_decl);
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_method_list *instance_methods; */
*************** build_protocol_template ()
*** 2596,2603 ****
  				 get_identifier (UTAG_METHOD_PROTOTYPE_LIST)));
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("instance_methods"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_method_list *class_methods; */
--- 2596,2603 ----
  				 get_identifier (UTAG_METHOD_PROTOTYPE_LIST)));
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("instance_methods"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_method_list *class_methods; */
*************** build_protocol_template ()
*** 2608,2615 ****
  				 get_identifier (UTAG_METHOD_PROTOTYPE_LIST)));
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class_methods"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    return finish_struct (template, field_decl_chain, NULL_TREE);
--- 2608,2615 ----
  				 get_identifier (UTAG_METHOD_PROTOTYPE_LIST)));
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class_methods"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    return finish_struct (template, field_decl_chain, NULL_TREE);
*************** build_method_prototype_list_template (li
*** 2672,2680 ****
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]);
    field_decl = get_identifier ("method_count");
! 
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    /* struct objc_method method_list[]; */
--- 2672,2679 ----
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]);
    field_decl = get_identifier ("method_count");
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    /* struct objc_method method_list[]; */
*************** build_method_prototype_list_template (li
*** 2682,2690 ****
    decl_specs = build_tree_list (NULL_TREE, list_type);
    field_decl = build_nt (ARRAY_REF, get_identifier ("method_list"),
  			 build_int_2 (size, 0));
! 
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    finish_struct (objc_ivar_list_record, field_decl_chain, NULL_TREE);
--- 2681,2688 ----
    decl_specs = build_tree_list (NULL_TREE, list_type);
    field_decl = build_nt (ARRAY_REF, get_identifier ("method_list"),
  			 build_int_2 (size, 0));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    finish_struct (objc_ivar_list_record, field_decl_chain, NULL_TREE);
*************** build_method_prototype_template ()
*** 2705,2720 ****
    decl_specs = tree_cons (NULL_TREE, xref_tag (RECORD_TYPE,
  		          get_identifier (TAG_SELECTOR)), NULL_TREE);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("_cmd"));
! 
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], NULL_TREE);
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("method_types"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    finish_struct (proto_record, field_decl_chain, NULL_TREE);
--- 2703,2717 ----
    decl_specs = tree_cons (NULL_TREE, xref_tag (RECORD_TYPE,
  		          get_identifier (TAG_SELECTOR)), NULL_TREE);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("_cmd"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], NULL_TREE);
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("method_types"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    finish_struct (proto_record, field_decl_chain, NULL_TREE);
*************** build_category_template ()
*** 3249,3264 ****
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("category_name"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    /* char *class_name; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class_name"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_method_list *instance_methods; */
--- 3246,3261 ----
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("category_name"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    /* char *class_name; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class_name"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_method_list *instance_methods; */
*************** build_category_template ()
*** 3268,3275 ****
  					  get_identifier (UTAG_METHOD_LIST)));
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("instance_methods"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_method_list *class_methods; */
--- 3265,3272 ----
  					  get_identifier (UTAG_METHOD_LIST)));
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("instance_methods"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_method_list *class_methods; */
*************** build_category_template ()
*** 3279,3286 ****
  					  get_identifier (UTAG_METHOD_LIST)));
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class_methods"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_protocol **protocol_list; */
--- 3276,3283 ----
  					  get_identifier (UTAG_METHOD_LIST)));
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class_methods"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_protocol **protocol_list; */
*************** build_category_template ()
*** 3291,3298 ****
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_list"));
    field_decl = build1 (INDIRECT_REF, NULL_TREE, field_decl);
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    finish_struct (objc_category_template, field_decl_chain, NULL_TREE);
--- 3288,3295 ----
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_list"));
    field_decl = build1 (INDIRECT_REF, NULL_TREE, field_decl);
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    finish_struct (objc_category_template, field_decl_chain, NULL_TREE);
*************** build_selector_template ()
*** 3316,3331 ****
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_VOID]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("sel_id"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    /* char *sel_type; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("sel_type"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    finish_struct (objc_selector_template, field_decl_chain, NULL_TREE);
--- 3313,3328 ----
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_VOID]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("sel_id"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    /* char *sel_type; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("sel_type"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    finish_struct (objc_selector_template, field_decl_chain, NULL_TREE);
*************** build_class_template ()
*** 3363,3370 ****
  
    decl_specs = build_tree_list (NULL_TREE, objc_class_template);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("isa"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    /* struct objc_class *super_class; */
--- 3360,3367 ----
  
    decl_specs = build_tree_list (NULL_TREE, objc_class_template);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("isa"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    /* struct objc_class *super_class; */
*************** build_class_template ()
*** 3372,3411 ****
    decl_specs = build_tree_list (NULL_TREE, objc_class_template);
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("super_class"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* char *name; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("name"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* long version; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]);
    field_decl = get_identifier ("version");
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* long info; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]);
    field_decl = get_identifier ("info");
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* long instance_size; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]);
    field_decl = get_identifier ("instance_size");
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_ivar_list *ivars; */
--- 3369,3408 ----
    decl_specs = build_tree_list (NULL_TREE, objc_class_template);
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("super_class"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* char *name; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("name"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* long version; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]);
    field_decl = get_identifier ("version");
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* long info; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]);
    field_decl = get_identifier ("info");
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* long instance_size; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_LONG]);
    field_decl = get_identifier ("instance_size");
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_ivar_list *ivars; */
*************** build_class_template ()
*** 3414,3421 ****
  				xref_tag (RECORD_TYPE,
  					  get_identifier (UTAG_IVAR_LIST)));
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("ivars"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_method_list *methods; */
--- 3411,3418 ----
  				xref_tag (RECORD_TYPE,
  					  get_identifier (UTAG_IVAR_LIST)));
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("ivars"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* struct objc_method_list *methods; */
*************** build_class_template ()
*** 3424,3431 ****
  				xref_tag (RECORD_TYPE,
  					  get_identifier (UTAG_METHOD_LIST)));
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("methods"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    if (flag_next_runtime)
--- 3421,3428 ----
  				xref_tag (RECORD_TYPE,
  					  get_identifier (UTAG_METHOD_LIST)));
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("methods"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    if (flag_next_runtime)
*************** build_class_template ()
*** 3436,3442 ****
  				    xref_tag (RECORD_TYPE,
  					      get_identifier ("objc_cache")));
        field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("cache"));
!       field_decl = grokfield (input_filename, lineno, field_decl,
  			      decl_specs, NULL_TREE);
        chainon (field_decl_chain, field_decl);
      }
--- 3433,3439 ----
  				    xref_tag (RECORD_TYPE,
  					      get_identifier ("objc_cache")));
        field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("cache"));
!       field_decl = grokfield (input_filename, input_line, field_decl,
  			      decl_specs, NULL_TREE);
        chainon (field_decl_chain, field_decl);
      }
*************** build_class_template ()
*** 3448,3454 ****
  				    xref_tag (RECORD_TYPE,
  					      get_identifier ("sarray")));
        field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("dtable"));
!       field_decl = grokfield (input_filename, lineno, field_decl,
  			      decl_specs, NULL_TREE);
        chainon (field_decl_chain, field_decl);
  
--- 3445,3451 ----
  				    xref_tag (RECORD_TYPE,
  					      get_identifier ("sarray")));
        field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("dtable"));
!       field_decl = grokfield (input_filename, input_line, field_decl,
  			      decl_specs, NULL_TREE);
        chainon (field_decl_chain, field_decl);
  
*************** build_class_template ()
*** 3457,3463 ****
        decl_specs = build_tree_list (NULL_TREE, objc_class_template);
        field_decl
  	= build1 (INDIRECT_REF, NULL_TREE, get_identifier ("subclass_list"));
!       field_decl = grokfield (input_filename, lineno, field_decl,
  			      decl_specs, NULL_TREE);
        chainon (field_decl_chain, field_decl);
  
--- 3454,3460 ----
        decl_specs = build_tree_list (NULL_TREE, objc_class_template);
        field_decl
  	= build1 (INDIRECT_REF, NULL_TREE, get_identifier ("subclass_list"));
!       field_decl = grokfield (input_filename, input_line, field_decl,
  			      decl_specs, NULL_TREE);
        chainon (field_decl_chain, field_decl);
  
*************** build_class_template ()
*** 3466,3472 ****
        decl_specs = build_tree_list (NULL_TREE, objc_class_template);
        field_decl
  	= build1 (INDIRECT_REF, NULL_TREE, get_identifier ("sibling_class"));
!       field_decl = grokfield (input_filename, lineno, field_decl,
  			      decl_specs, NULL_TREE);
        chainon (field_decl_chain, field_decl);
      }
--- 3463,3469 ----
        decl_specs = build_tree_list (NULL_TREE, objc_class_template);
        field_decl
  	= build1 (INDIRECT_REF, NULL_TREE, get_identifier ("sibling_class"));
!       field_decl = grokfield (input_filename, input_line, field_decl,
  			      decl_specs, NULL_TREE);
        chainon (field_decl_chain, field_decl);
      }
*************** build_class_template ()
*** 3480,3486 ****
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_list"));
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, field_decl);
!   field_decl = grokfield (input_filename, lineno, field_decl,
  			  decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
--- 3477,3483 ----
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("protocol_list"));
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, field_decl);
!   field_decl = grokfield (input_filename, input_line, field_decl,
  			  decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
*************** build_class_template ()
*** 3488,3503 ****
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_VOID]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("sel_id"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* void *gc_object_type; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_VOID]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("gc_object_type"));
!   field_decl
!     = grokfield (input_filename, lineno, field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    finish_struct (objc_class_template, field_decl_chain, NULL_TREE);
--- 3485,3500 ----
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_VOID]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("sel_id"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    /* void *gc_object_type; */
  
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_VOID]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("gc_object_type"));
!   field_decl = grokfield (input_filename, input_line,
! 			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
    finish_struct (objc_class_template, field_decl_chain, NULL_TREE);
*************** build_super_template ()
*** 3624,3630 ****
    decl_specs = build_tree_list (NULL_TREE, objc_object_reference);
    field_decl = get_identifier ("self");
    field_decl = build1 (INDIRECT_REF, NULL_TREE, field_decl);
!   field_decl = grokfield (input_filename, lineno,
  			  field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
--- 3621,3627 ----
    decl_specs = build_tree_list (NULL_TREE, objc_object_reference);
    field_decl = get_identifier ("self");
    field_decl = build1 (INDIRECT_REF, NULL_TREE, field_decl);
!   field_decl = grokfield (input_filename, input_line,
  			  field_decl, decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
*************** build_super_template ()
*** 3634,3640 ****
    decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, decl_specs));
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class"));
  
!   field_decl = grokfield (input_filename, lineno,
  			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
--- 3631,3637 ----
    decl_specs = build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, decl_specs));
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("class"));
  
!   field_decl = grokfield (input_filename, input_line,
  			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
*************** build_ivar_template ()
*** 3668,3674 ****
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("ivar_name"));
  
!   field_decl = grokfield (input_filename, lineno, field_decl,
  			  decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
--- 3665,3671 ----
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("ivar_name"));
  
!   field_decl = grokfield (input_filename, input_line, field_decl,
  			  decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
*************** build_ivar_template ()
*** 3677,3683 ****
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("ivar_type"));
  
!   field_decl = grokfield (input_filename, lineno, field_decl,
  			  decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
--- 3674,3680 ----
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_CHAR]);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("ivar_type"));
  
!   field_decl = grokfield (input_filename, input_line, field_decl,
  			  decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
*************** build_ivar_template ()
*** 3686,3692 ****
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]);
    field_decl = get_identifier ("ivar_offset");
  
!   field_decl = grokfield (input_filename, lineno, field_decl,
  			  decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
--- 3683,3689 ----
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]);
    field_decl = get_identifier ("ivar_offset");
  
!   field_decl = grokfield (input_filename, input_line, field_decl,
  			  decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
*************** build_ivar_list_template (list_type, siz
*** 3715,3721 ****
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]);
    field_decl = get_identifier ("ivar_count");
  
!   field_decl = grokfield (input_filename, lineno, field_decl,
  			  decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
--- 3712,3718 ----
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]);
    field_decl = get_identifier ("ivar_count");
  
!   field_decl = grokfield (input_filename, input_line, field_decl,
  			  decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
*************** build_ivar_list_template (list_type, siz
*** 3725,3731 ****
    field_decl = build_nt (ARRAY_REF, get_identifier ("ivar_list"),
  			 build_int_2 (size, 0));
  
!   field_decl = grokfield (input_filename, lineno,
  			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
--- 3722,3728 ----
    field_decl = build_nt (ARRAY_REF, get_identifier ("ivar_list"),
  			 build_int_2 (size, 0));
  
!   field_decl = grokfield (input_filename, input_line,
  			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
*************** build_method_list_template (list_type, s
*** 3759,3765 ****
  		 get_identifier (UTAG_METHOD_PROTOTYPE_LIST)));
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("method_next"));
!   field_decl = grokfield (input_filename, lineno, field_decl,
  			  decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
--- 3756,3762 ----
  		 get_identifier (UTAG_METHOD_PROTOTYPE_LIST)));
    field_decl
      = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("method_next"));
!   field_decl = grokfield (input_filename, input_line, field_decl,
  			  decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
*************** build_method_list_template (list_type, s
*** 3768,3774 ****
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]);
    field_decl = get_identifier ("method_count");
  
!   field_decl = grokfield (input_filename, lineno,
  			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
--- 3765,3771 ----
    decl_specs = build_tree_list (NULL_TREE, ridpointers[(int) RID_INT]);
    field_decl = get_identifier ("method_count");
  
!   field_decl = grokfield (input_filename, input_line,
  			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
*************** build_method_list_template (list_type, s
*** 3778,3784 ****
    field_decl = build_nt (ARRAY_REF, get_identifier ("method_list"),
  			 build_int_2 (size, 0));
  
!   field_decl = grokfield (input_filename, lineno,
  			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
--- 3775,3781 ----
    field_decl = build_nt (ARRAY_REF, get_identifier ("method_list"),
  			 build_int_2 (size, 0));
  
!   field_decl = grokfield (input_filename, input_line,
  			  field_decl, decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
*************** build_method_template ()
*** 3983,3996 ****
  			  NULL_TREE);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("_cmd"));
  
!   field_decl = grokfield (input_filename, lineno, field_decl,
  			  decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], NULL_TREE);
    field_decl = build1 (INDIRECT_REF, NULL_TREE,
  		       get_identifier ("method_types"));
!   field_decl = grokfield (input_filename, lineno, field_decl,
  			  decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
--- 3980,3993 ----
  			  NULL_TREE);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("_cmd"));
  
!   field_decl = grokfield (input_filename, input_line, field_decl,
  			  decl_specs, NULL_TREE);
    field_decl_chain = field_decl;
  
    decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_CHAR], NULL_TREE);
    field_decl = build1 (INDIRECT_REF, NULL_TREE,
  		       get_identifier ("method_types"));
!   field_decl = grokfield (input_filename, input_line, field_decl,
  			  decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
*************** build_method_template ()
*** 3998,4004 ****
  
    decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_VOID], NULL_TREE);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("_imp"));
!   field_decl = grokfield (input_filename, lineno, field_decl,
  			  decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
--- 3995,4001 ----
  
    decl_specs = tree_cons (NULL_TREE, ridpointers[(int) RID_VOID], NULL_TREE);
    field_decl = build1 (INDIRECT_REF, NULL_TREE, get_identifier ("_imp"));
!   field_decl = grokfield (input_filename, input_line, field_decl,
  			  decl_specs, NULL_TREE);
    chainon (field_decl_chain, field_decl);
  
*************** add_instance_variable (class, public, de
*** 5828,5834 ****
    else
      CLASS_RAW_IVARS (class) = raw_decl;
  
!   field_decl = grokfield (input_filename, lineno,
  			  declarator, declspecs, width);
  
    /* Overload the public attribute, it is not used for FIELD_DECLs.  */
--- 5825,5831 ----
    else
      CLASS_RAW_IVARS (class) = raw_decl;
  
!   field_decl = grokfield (input_filename, input_line,
  			  declarator, declspecs, width);
  
    /* Overload the public attribute, it is not used for FIELD_DECLs.  */
Index: treelang/ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/treelang/ChangeLog,v
retrieving revision 1.34
diff -c -3 -p -r1.34 ChangeLog
*** treelang/ChangeLog	21 Mar 2003 07:27:42 -0000	1.34
--- treelang/ChangeLog	30 Apr 2003 16:29:39 -0000
***************
*** 1,3 ****
--- 1,8 ----
+ 2003-04-30  Nathan Sidwell  <nathan@codesourcery.com>
+ 
+ 	* Make-lang.in (parse.c): Reorder bison arguments for POSIXLY_CORRECT.
+ 	* treetree.c: Do not #include parse.h.
+ 
  2003-03-21  Andreas Jaeger  <aj@suse.de>
  
  	* treetree.c (cpp_create_reader): Follow prototype change in
Index: treelang/tree1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/treelang/tree1.c,v
retrieving revision 1.5
diff -c -3 -p -r1.5 tree1.c
*** treelang/tree1.c	8 Mar 2003 21:12:26 -0000	1.5
--- treelang/tree1.c	30 Apr 2003 16:29:40 -0000
*************** treelang_init ()
*** 185,191 ****
    in_fname = main_input_filename;
  
    /* Set up the declarations needed for this front end.  */
!   lineno = 0;
  
    /* Init decls etc.  */
  
--- 185,191 ----
    in_fname = main_input_filename;
  
    /* Set up the declarations needed for this front end.  */
!   input_line = 0;
  
    /* Init decls etc.  */
  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]