From 7e2af53a14ce4710e1dca754acf603db0f9d8802 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 21 Sep 2003 16:39:40 -0700 Subject: tree.h (TREE_LOCUS): Rename from DECL_SOURCE_LOCATION; make const. * tree.h (TREE_LOCUS): Rename from DECL_SOURCE_LOCATION; make const. (TREE_FILENAME, TREE_LINENO): Likewise. (set_tree_locus, copy_tree_locus, set_tree_file_line): New. (TREE_LOCUS_SET_P): New. * c-aux-info.c, c-decl.c, c-parse.in, coverage.c, dbxout.c, diagnostic.c, dwarf2out.c, dwarfout.c, function.c, integrate.c, print-tree.c, stmt.c, toplev.c, tree-dump.c, tree-inline.c, tree-optimize.c, tree.c, tree.def, xcoffout.c, config/alpha/alpha.c, config/mips/mips.c, doc/c-tree.texi, objc/objc-act.c: Update to match. ada/ * trans.c, utils.c: Update for DECL_SOURCE_LOCATION rename and change to const. cp/ * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c, method.c, optimize.c, pt.c, semantics.c, tree.c: Update for DECL_SOURCE_LOCATION rename and change to const. f/ * com.c, ste.c: Update for DECL_SOURCE_LOCATION rename and change to const. java/ * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y, resource.c: Update for DECL_SOURCE_LOCATION rename and change to const. treelang/ * treetree.c: Update for DECL_SOURCE_LOCATION rename and change to const. From-SVN: r71636 --- gcc/objc/objc-act.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'gcc/objc') diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 0c07543..02678a4 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -1984,13 +1984,12 @@ build_selector_translation_table (void) } if (!found) { - /* Adjust line number for warning message. */ - int save_lineno = input_line; + location_t loc = input_location; 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; + loc = TREE_LOCUS (TREE_PURPOSE (chain)); + + warning ("%Hcreating selector for non existant method %s", + &loc, IDENTIFIER_POINTER (TREE_VALUE (chain))); } } @@ -2857,7 +2856,6 @@ build_tmp_function_decl (void) expr_decl = build1 (INDIRECT_REF, NULL_TREE, expr_decl); tmp_decl = define_decl (expr_decl, decl_specs); - DECL_SOURCE_LINE (tmp_decl) = 0; return tmp_decl; } -- cgit v1.1