diff options
author | David Malcolm <dmalcolm@redhat.com> | 2013-11-22 14:18:13 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2013-11-22 14:18:13 +0000 |
commit | 8400e75ec451d9ecaf58ec1c07a29824a31a2e0a (patch) | |
tree | a7c4dbecf9c3315f9546fbd414900591eab0b7fa /gcc/java | |
parent | f81448f7525462e58bc1393eb3b2157a66672cb0 (diff) | |
download | gcc-8400e75ec451d9ecaf58ec1c07a29824a31a2e0a.zip gcc-8400e75ec451d9ecaf58ec1c07a29824a31a2e0a.tar.gz gcc-8400e75ec451d9ecaf58ec1c07a29824a31a2e0a.tar.bz2 |
Remove macros that implicitly use input_location
gcc/
* input.h (input_line): Remove.
(input_filename): Likewise.
(in_system_header): Likewise.
* tree.h (EXPR_LOC_OR_HERE): Remove.
* config/bfin/bfin.c (output_file_start): Remove use of
input_filename macro.
* builtins.c (c_strlen): Remove use of EXPR_LOC_OR_HERE macro.
* gimplify.c (internal_get_tmp_var): Likewise.
EXPR_LOC_OR_HERE macro.
(shortcut_cond_expr): Likewise.
* tree-diagnostic.c (diagnostic_report_current_function): Remove
use of input_filename macro.
* tree.c (get_file_function_name): Likewise.
gcc/ada
* gcc-interface/utils2.c (build_call_raise): Remove use of
input_line macro.
(build_call_raise_range): Likewise.
(build_call_raise_column): Likewise.
gcc/c-family
* c-common.c (unsafe_conversion_p): Remove use of
EXPR_LOC_OR_HERE macro.
(conversion_warning): Likewise.
(warnings_for_convert_and_check): Likewise.
(warn_for_collisions_1): Likewise.
(shorten_compare): Likewise, and remove use of in_system_header
macro, using the location from the former.
* c-lex.c (dump_one_header): Remove use of input_filename macro.
(cb_def_pragma): Remove use of in_system_header macro.
(lex_string): Likewise.
* c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
gcc/c
* c-decl.c (define_label, shadow_tag_warned)
(check_bitfield_type_and_width, grokdeclarator, grokparms,
store_parm_decls_newstyle, store_parm_decls_oldstyle)
(declspecs_add_type): Remove use of in_system_header macro.
* c-parser.c (c_parser_unary_expression): Likewise.
* c-typeck.c (store_init_value, process_init_element)
(c_start_case): Likewise.
* c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
macro.
* c-parser.c (c_parser_set_source_position_from_token): Remove
reference to in_system_header from comment.
gcc/cp
* call.c (build_integral_nontype_arg_conv): Remove use of
EXPR_LOC_OR_HERE macro.
(convert_like_real): Likewise.
(convert_arg_to_ellipsis): Likewise.
(build_cxx_call): Likewise.
(perform_implicit_conversion_flags): Likewise.
(initialize_reference): Likewise.
* cvt.c (cp_convert_to_pointer): Likewise.
(convert_to_reference): Likewise.
(ocp_convert): Likewise.
(convert_to_void): Likewise.
* decl.c (pop_label): Update comment.
(pop_switch): Remove use of EXPR_LOC_OR_HERE macro.
(check_tag_decl): Remove use of in_system_header macro.
(make_rtl_for_nonlocal_decl): Remove use of input_filename
macro.
(compute_array_index_type): Remove use of in_system_header
macro.
(grokdeclarator): Likewise.
* error.c (dump_global_iord): Remove use of input_filename
macro.
(location_of): Remove use of EXPR_LOC_OR_HERE macro.
(maybe_warn_cpp0x): Remove use of in_system_header macro.
* init.c (build_new_1): Remove use of EXPR_LOC_OR_HERE macro.
* lex.c (handle_pragma_interface): Remove use of input_filename
macro.
(handle_pragma_implementation): Likewise.
(cxx_make_type): Likewise.
(in_main_input_context): Likewise.
* name-lookup.c (push_binding_level): Remove use of
input_line macro.
(leave_scope): Likewise.
(resume_scope): Likewise.
* parser.c (cp_parser_unqualified_id): Remove use of
in_system_header macro.
(cp_parser_cast_expression): Likewise.
(cp_parser_declaration_seq_opt): Likewise.
(cp_parser_enumerator_list): Likewise.
(cp_parser_parameter_declaration_clause): Likewise.
(cp_parser_exception_specification_opt): Likewise.
* pt.c (unify_arg_conversion): Remove use of EXPR_LOC_OR_HERE
macro.
(convert_nontype_argument): Likewise.
(push_tinst_level): Remove use of in_system_header macro.
(tsubst_copy_and_build): Remove use of EXPR_LOC_OR_HERE
macros.
(do_decl_instantiation): Remove use of in_system_header macro.
(do_type_instantiation): Likewise.
* semantics.c (finish_call_expr): Remove use of EXPR_LOC_OR_HERE
macro.
(begin_class_definition): Remove use of input_filename macro.
(cxx_eval_call_expression): Remove use of EXPR_LOC_OR_HERE
macro.
(cxx_eval_constant_expression): Likewise.
(potential_constant_expression_1): Likewise.
* typeck.c (decay_conversion): Likewise.
(rationalize_conditional_expr): Likewise.
(build_x_compound_expr_from_list): Likewise.
(convert_for_assignment): Likewise.
* typeck2.c (check_narrowing): Likewise.
gcc/fortran
* trans.c (trans_runtime_error_vararg): Remove use of input_line
macro.
gcc/java
* class.c (maybe_layout_super_class): Update comment.
* decl.c (java_add_stmt): Remove use of input_filename macro.
* jcf-parse.c (set_source_filename): Remove use of
input_filename macro.
(parse_class_file): Remove use of input_line and input_filename
macros.
(java_parse_file): Remove use of input_filename macro.
From-SVN: r205262
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/java/class.c | 2 | ||||
-rw-r--r-- | gcc/java/decl.c | 2 | ||||
-rw-r--r-- | gcc/java/jcf-parse.c | 18 |
4 files changed, 23 insertions, 9 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 0e277e4..6843926 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,13 @@ +2013-11-22 David Malcolm <dmalcolm@redhat.com> + + * class.c (maybe_layout_super_class): Update comment. + * decl.c (java_add_stmt): Remove use of input_filename macro. + * jcf-parse.c (set_source_filename): Remove use of + input_filename macro. + (parse_class_file): Remove use of input_line and input_filename + macros. + (java_parse_file): Remove use of input_filename macro. + 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com> * class.c, expr.c: Replace tree_low_cst (..., 0) with tree_to_shwi diff --git a/gcc/java/class.c b/gcc/java/class.c index 58bc92f..532c9c1 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -2415,7 +2415,7 @@ maybe_layout_super_class (tree super_class, tree this_class ATTRIBUTE_UNUSED) } /* safe_layout_class just makes sure that we can load a class without - disrupting the current_class, input_file, input_line, etc, information + disrupting the current_class, input_location, etc, information about the class processed currently. */ void diff --git a/gcc/java/decl.c b/gcc/java/decl.c index 70e21b0..39b76a5 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -2018,7 +2018,7 @@ java_add_stmt (tree new_stmt) tree stmts = current_binding_level->stmts; tree_stmt_iterator i; - if (input_filename) + if (LOCATION_FILE (input_location)) walk_tree (&new_stmt, set_input_location, NULL, NULL); if (stmts == NULL) diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 9799523..b6f099a 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -313,13 +313,14 @@ set_source_filename (JCF *jcf, int index) { tree sfname_id = get_name_constant (jcf, index); const char *sfname = IDENTIFIER_POINTER (sfname_id); - const char *old_filename = input_filename; + const char *old_filename = LOCATION_FILE (input_location); int new_len = IDENTIFIER_LENGTH (sfname_id); if (old_filename != NULL) { int old_len = strlen (old_filename); - /* Use the current input_filename (derived from the class name) - if it has a directory prefix, but otherwise matches sfname. */ + /* Use the filename from current input_location (derived from the + class name) if it has a directory prefix, but otherwise matches + sfname. */ if (old_len > new_len && filename_cmp (sfname, old_filename + old_len - new_len) == 0 && (old_filename[old_len - new_len - 1] == '/' @@ -1560,7 +1561,8 @@ parse_class_file (void) linemap_add (line_table, LC_ENTER, 0, loc.file, loc.line); } file_start_location = input_location; - (*debug_hooks->start_source_file) (input_line, input_filename); + (*debug_hooks->start_source_file) (LOCATION_LINE (input_location), + LOCATION_FILE (input_location)); java_mark_class_local (current_class); @@ -1618,7 +1620,8 @@ parse_class_file (void) for (ptr += 2; --i >= 0; ptr += 4) { int line = GET_u2 (ptr); - /* Set initial input_line to smallest linenumber. + /* Set initial line of input_location to smallest + * linenumber. * Needs to be set before init_function_start. */ if (min_line == 0 || line < min_line) min_line = line; @@ -1748,7 +1751,7 @@ java_parse_file (void) int avail = 2000; finput = fopen (main_input_filename, "r"); if (finput == NULL) - fatal_error ("can%'t open %s: %m", input_filename); + fatal_error ("can%'t open %s: %m", LOCATION_FILE (input_location)); list = XNEWVEC (char, avail); next = list; for (;;) @@ -1767,7 +1770,8 @@ java_parse_file (void) if (count == 0) { if (! feof (finput)) - fatal_error ("error closing %s: %m", input_filename); + fatal_error ("error closing %s: %m", + LOCATION_FILE (input_location)); *next = '\0'; break; } |