aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lex.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2013-11-22 14:18:13 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2013-11-22 14:18:13 +0000
commit8400e75ec451d9ecaf58ec1c07a29824a31a2e0a (patch)
treea7c4dbecf9c3315f9546fbd414900591eab0b7fa /gcc/cp/lex.c
parentf81448f7525462e58bc1393eb3b2157a66672cb0 (diff)
downloadgcc-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/cp/lex.c')
-rw-r--r--gcc/cp/lex.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 5d8a313..2d517a4 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -352,18 +352,18 @@ handle_pragma_interface (cpp_reader* /*dfile*/)
if (fname == error_mark_node)
return;
else if (fname == 0)
- filename = lbasename (input_filename);
+ filename = lbasename (LOCATION_FILE (input_location));
else
filename = TREE_STRING_POINTER (fname);
- finfo = get_fileinfo (input_filename);
+ finfo = get_fileinfo (LOCATION_FILE (input_location));
if (impl_file_chain == 0)
{
/* If this is zero at this point, then we are
auto-implementing. */
if (main_input_filename == 0)
- main_input_filename = input_filename;
+ main_input_filename = LOCATION_FILE (input_location);
}
finfo->interface_only = interface_strcmp (filename);
@@ -397,7 +397,7 @@ handle_pragma_implementation (cpp_reader* /*dfile*/)
if (main_input_filename)
filename = main_input_filename;
else
- filename = input_filename;
+ filename = LOCATION_FILE (input_location);
filename = lbasename (filename);
}
else
@@ -683,7 +683,8 @@ cxx_make_type (enum tree_code code)
/* Set up some flags that give proper default behavior. */
if (RECORD_OR_UNION_CODE_P (code))
{
- struct c_fileinfo *finfo = get_fileinfo (input_filename);
+ struct c_fileinfo *finfo = \
+ get_fileinfo (LOCATION_FILE (input_location));
SET_CLASSTYPE_INTERFACE_UNKNOWN_X (t, finfo->interface_unknown);
CLASSTYPE_INTERFACE_ONLY (t) = finfo->interface_only;
}
@@ -711,5 +712,5 @@ in_main_input_context (void)
return filename_cmp (main_input_filename,
LOCATION_FILE (tl->locus)) == 0;
else
- return filename_cmp (main_input_filename, input_filename) == 0;
+ return filename_cmp (main_input_filename, LOCATION_FILE (input_location)) == 0;
}