diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-26 16:05:24 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-26 16:05:24 +0000 |
commit | 9c85a98a2b03f3bacaba6103c8112066d0d272bb (patch) | |
tree | f43ad37c53fe9e709732439c80643fe626116583 /gcc/cp | |
parent | c039429494a2dec15ad4bf0b4a6d2fcc13ce8298 (diff) | |
download | gcc-9c85a98a2b03f3bacaba6103c8112066d0d272bb.tar.gz |
gcc
* system.h (USE_MAPPED_LOCATION): Poison.
* Makefile.in (GTFILES): Put CPP_ID_DATA_H first.
* tree-cfg.c (make_cond_expr_edges): Remove old location code.
(make_goto_expr_edges): Likewise.
(remove_bb): Likewise.
(execute_warn_function_return): Likewise.
* basic-block.h (struct edge_def) <goto_locus>: Change type to
location_t.
* c-common.c (fname_decl): Remove old location code.
* tree-vect-transform.c (vect_finish_stmt_generation): Remove old
location code.
* rtl.h (ASM_OPERANDS_SOURCE_LOCATION): Remove old-location
variant.
(ASM_INPUT_SOURCE_LOCATION): Likewise.
(gen_rtx_ASM_INPUT): Likewise.
(gen_rtx_ASM_INPUT_loc): Likewise.
(get_rtx_asm_OPERANDS): Remove.
* cfglayout.c (insn_locators_alloc): Remove old location code.
(set_curr_insn_source_location): Likewise.
(curr_insn_locator): Likewise.
* print-tree.c (print_node): Remove old location code.
* tree-mudflap.c (mf_varname_tree): Remove old location code.
(mf_file_function_line_tree): Remove test of USE_MAPPED_LOCATION.
* cfgexpand.c (expand_gimple_cond_expr): Don't use
location_from_locus.
(construct_exit_block): Remove old location code.
* emit-rtl.c (force_next_line_note): Remove old location code.
* profile.c (branch_prob): Remove old location code.
* tree-vectorizer.h (LOC, UNKNOWN_LOC, EXPR_LOC, LOC_FILE,
LOC_LINE): Remove old-location variants.
* langhooks.c (lhd_print_error_function): Remove old location
code.
* configure, config.in: Rebuilt.
* configure.ac (--enable-mapped-location): Remove.
* c-decl.c (c_init_decl_processing): Remove old location code.
(finish_function): Likewise.
* recog.c (decode_asm_operands): Remove old location code.
* c-pch.c (c_common_read_pch): Remove old location code.
* rtl.def (ASM_INPUT, ASM_OPERANDS): Remove old location
variants.
* gimple-low.c (lower_function_body): Remove old location code.
* toplev.c (unknown_location): Remove.
(push_srcloc): Remove old-location variant.
(process_options): Remove old location code.
(lang_dependent_init): Likewise.
* input.h (UNKNOWN_LOCATION): Move definition.
(location_t): Undeprecate.
(source_locus): Remove.
(location_from_locus): Remove.
(struct location_s): Remove.
Remove all old-location code.
(input_line, input_filename): Remove.
* final.c (final_scan_insn): Remove old location code.
* diagnostic.c (diagnostic_build_prefix): Remove
USE_MAPPED_LOCATION test.
* tree.h (gimple_stmt) <locus>: Now a location_t.
(tree_exp) <locus>: Likewise.
(DECL_IS_BUILTIN): Remove old-location variant.
(annotate_with_file_line, annotate_with_locus): Likewise.
(expr_locus, set_expr_locus): Update.
* tree.c (build1_stat): Remove old location code.
(last_annotated_node): Remove.
(annotate_with_file_line): Remove old-location variant.
(annotate_with_locus): Likewise.
(expr_location): Remove old location code.
(set_expr_location): Likewise.
(expr_has_location): Likewise.
(expr_locus): Likewise.
(set_expr_locus): Likewise.
(expr_filename): Don't use location_from_locus.
(expr_lineno): Likewise.
* rtl-error.c (location_for_asm): Remove old location code.
* c-lex.c (cb_line_change): Remove old location code.
(fe_file_change): Likewise.
(cb_def_pragma): Likewise.
(c_lex_with_flags): Likewise.
* gengtype.c (do_typedef): Don't special-case location types.
(define_location_structures): Remove.
(main): Don't call define_location_structures.
* tree-pretty-print.c (dump_implicit_edges): Remove old location
code.
gcc/ada
* misc.c (internal_error_function): Remove test of
USE_MAPPED_LOCATION.
* trans.c (gigi): Remove test of USE_MAPPED_LOCATION.
(Sloc_to_locus): Remove old location code.
gcc/cp
* parser.c (eof_token): Remove old location code.
(check_empty_body): Remove test of USE_MAPPED_LOCATION.
* decl2.c (generate_ctor_or_dtor_function): Remove old location
code.
(cp_write_global_declarations): Likewise.
* lex.c (cxx_init): Remove old location code.
(handle_pragma_implementation): Remove test of
USE_MAPPED_LOCATION.
* pt.c (tsubst): Remove old location code.
* error.c (cp_print_error_function): Remove test of
USE_MAPPED_LOCATION.
* decl.c (pop_label): Remove old location code.
(finish_function): Likewise.
gcc/fortran
* trans-io.c (set_error_locus): Remove old location code.
* trans-decl.c (gfc_set_decl_location): Remove old location code.
* f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
* scanner.c (gfc_gobble_whitespace): Remove old location code.
(get_file): Likewise.
(preprocessor_line): Likewise.
(load_file): Likewise.
(gfc_new_file): Likewise.
* trans.c (gfc_trans_runtime_check): Remove old location code.
(gfc_get_backend_locus): Likewise.
(gfc_set_backend_locus): Likewise.
* data.c (gfc_assign_data_value): Remove old location code.
* error.c (show_locus): Remove old location code.
* gfortran.h (gfc_linebuf): Remove old location code.
(gfc_linebuf_linenum): Remove old-location variant.
gcc/java
* lang.c (java_post_options): Remove conditional.
* expr.c (expand_byte_code): Remove old location code.
* jcf-parse.c (set_source_filename): Remove old location code.
(give_name_to_class): Likewise.
(jcf_parse): Likewise.
(duplicate_class_warning): Likewise.
(parse_class_file): Likewise.
(java_parse_file): Likewise.
* decl.c (finish_method): Remove old location code.
* class.c (push_class): Remove old location code.
gcc/objc
* objc-act.c (objc_init): Remove old location code.
gcc/treelang
* tree1.c (treelang_init): Remove old location code.
(treelang_parse_file): Likewise.
* lex.l (LINEMAP_POSITION_FOR_COLUMN): Remove.
(update_lineno_charno): Remove old location code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132679 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 16 | ||||
-rw-r--r-- | gcc/cp/decl.c | 9 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 21 | ||||
-rw-r--r-- | gcc/cp/error.c | 2 | ||||
-rw-r--r-- | gcc/cp/lex.c | 17 | ||||
-rw-r--r-- | gcc/cp/parser.c | 9 | ||||
-rw-r--r-- | gcc/cp/pt.c | 8 |
7 files changed, 23 insertions, 59 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7ab99249c57..f56c61c7310 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,19 @@ +2008-02-26 Tom Tromey <tromey@redhat.com> + + * parser.c (eof_token): Remove old location code. + (check_empty_body): Remove test of USE_MAPPED_LOCATION. + * decl2.c (generate_ctor_or_dtor_function): Remove old location + code. + (cp_write_global_declarations): Likewise. + * lex.c (cxx_init): Remove old location code. + (handle_pragma_implementation): Remove test of + USE_MAPPED_LOCATION. + * pt.c (tsubst): Remove old location code. + * error.c (cp_print_error_function): Remove test of + USE_MAPPED_LOCATION. + * decl.c (pop_label): Remove old location code. + (finish_function): Likewise. + 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR 26264 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 85186c97c24..5a5a81a4d01 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -357,12 +357,7 @@ pop_label (tree label, tree old_value) location_t location; error ("label %q+D used but not defined", label); -#ifdef USE_MAPPED_LOCATION location = input_location; /* FIXME want (input_filename, (line)0) */ -#else - location.file = input_filename; - location.line = 0; -#endif /* Avoid crashing later. */ define_label (location, DECL_NAME (label)); } @@ -11807,14 +11802,10 @@ finish_function (int flags) /* Hack. We don't want the middle-end to warn that this return is unreachable, so put the statement on the special line 0. */ -#ifdef USE_MAPPED_LOCATION { location_t linezero = linemap_line_start (line_table, 0, 1); SET_EXPR_LOCATION (stmt, linezero); } -#else - annotate_with_file_line (stmt, input_filename, 0); -#endif } if (use_eh_spec_block (current_function_decl)) diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 695390ce78f..d7e3d766ca7 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1,6 +1,6 @@ /* Process declarations and variables for C++ compiler. Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. @@ -2995,11 +2995,8 @@ generate_ctor_or_dtor_function (bool constructor_p, int priority, size_t i; input_location = *locus; -#ifdef USE_MAPPED_LOCATION /* ??? */ -#else - locus->line++; -#endif + /* Was: locus->line++; */ /* We use `I' to indicate initialization and `D' to indicate destruction. */ @@ -3179,13 +3176,7 @@ cp_write_global_declarations (void) if (pch_file) c_common_write_pch (); -#ifdef USE_MAPPED_LOCATION - /* FIXME - huh? */ -#else - /* Otherwise, GDB can get confused, because in only knows - about source for LINENO-1 lines. */ - input_line -= 1; -#endif + /* FIXME - huh? was input_line -= 1;*/ /* We now have to write out all the stuff we put off writing out. These include: @@ -3318,11 +3309,7 @@ cp_write_global_declarations (void) instantiations, etc. */ reconsider = true; ssdf_count++; -#ifdef USE_MAPPED_LOCATION - /* ??? */ -#else - locus.line++; -#endif + /* ??? was: locus.line++; */ } /* Go through the set of inline functions whose bodies have not diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 94e43c05f9c..0893f801565 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -2436,14 +2436,12 @@ cp_print_error_function (diagnostic_context *context, pp_base_newline (context->printer); if (s.file != NULL) { -#ifdef USE_MAPPED_LOCATION if (flag_show_column && s.column != 0) pp_printf (context->printer, " inlined from %qs at %s:%d:%d", cxx_printable_name (fndecl, 2), s.file, s.line, s.column); else -#endif pp_printf (context->printer, " inlined from %qs at %s:%d", cxx_printable_name (fndecl, 2), diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 136260bef49..2558a78dbf7 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -1,6 +1,6 @@ /* Separate lexical analyzer for GNU C++. Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) @@ -385,14 +385,7 @@ cxx_init (void) for (i = 0; i < ARRAY_SIZE (stmt_codes); i++) statement_code_p[stmt_codes[i]] = true; - /* We cannot just assign to input_filename because it has already - been initialized and will be used later as an N_BINCL for stabs+ - debugging. */ -#ifdef USE_MAPPED_LOCATION push_srcloc (BUILTINS_LOCATION); -#else - push_srcloc ("<built-in>", 0); -#endif init_reswords (); init_tree (); @@ -572,17 +565,9 @@ handle_pragma_implementation (cpp_reader* dfile ATTRIBUTE_UNUSED ) else { filename = ggc_strdup (TREE_STRING_POINTER (fname)); -#ifdef USE_MAPPED_LOCATION - /* We currently cannot give this diagnostic, as we reach this point - only after cpplib has scanned the entire translation unit, so - cpp_included always returns true. A plausible fix is to compare - the current source-location cookie with the first source-location - cookie (if any) of the filename, but this requires completing the - --enable-mapped-location project first. See PR 17577. */ if (cpp_included_before (parse_in, filename, input_location)) warning (0, "#pragma implementation for %qs appears after " "file is included", filename); -#endif } for (; ifiles; ifiles = ifiles->next) diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index cb0059392a7..77542bfb9f1 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -100,11 +100,7 @@ DEF_VEC_ALLOC_P (cp_token_position,heap); static cp_token eof_token = { CPP_EOF, RID_MAX, 0, PRAGMA_NONE, 0, 0, false, 0, { NULL }, -#if USE_MAPPED_LOCATION 0 -#else - {0, 0} -#endif }; /* The cp_lexer structure represents the C++ lexer. It is responsible @@ -7206,10 +7202,7 @@ check_empty_body (cp_parser* parser, const char* type) semi_loc = expand_location (token->location); if (close_loc.line == semi_loc.line -#ifdef USE_MAPPED_LOCATION - && close_loc.column+1 == semi_loc.column -#endif - ) + && close_loc.column+1 == semi_loc.column) warning (OPT_Wempty_body, "suggest a space before %<;%> or explicit braces around empty " "body in %<%s%> statement", diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 2a54986c551..ade17a5cedd 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -9156,13 +9156,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl) message to avoid spewing a ton of messages during a single bad template instantiation. */ if (complain & tf_error -#ifdef USE_MAPPED_LOCATION - && last_loc != input_location -#else - && (last_loc.line != input_line - || last_loc.file != input_filename) -#endif - ) + && last_loc != input_location) { if (TREE_CODE (type) == VOID_TYPE) error ("forming reference to void"); |