From cbb9e6aa60312ced2492aedccb38dc1a587fe570 Mon Sep 17 00:00:00 2001 From: tobi Date: Thu, 27 May 2004 12:35:12 +0000 Subject: * gfortran.h (gfc_current_locus, gfc_set_locus): Remove. (gfc_current_locus): Declare new global variable. * scanner.c (gfc_current_locus, gfc_set_locus): Remove. (gfc_current_locus1): Rename ... (gfc_current_locus): ... to this. (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char, skip_fixed_comments, skip_free_comments, gfc_next_char_literal, gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use gfc_current_locus instead of gfc_current_locus1, gfc_set_locus() and gfc_current_locus(), respectively. * array.c (match_subscript, gfc_match_array_ref, match_array_list, match_array_cons_element, gfc_match_array_constructor): Read/modify gfc_current_locus instead of calling gfc_set_locus() and gfc_current_locus(). * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec, match_attr_spec, gfc_match_function_decl, gfc_match_end, attr_decl1, gfc_match_save): Likewise. * error.c (error_print, gfc_internal_error): Likewise. * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise. * interface.c (gfc_add_interface): Likewise. * io.c (gfc_match_format, match_dt_format, match_dt_element, match_io_iterator, match_io): Likewise. * match.c (gfc_match_space, gfc_match_eos, gfc_match_small_literal_int, gfc_match_st_label, gfc_match_strings, gfc_match_name, gfc_match_iterator, gfc_match_char, gfc_match, gfc_match_assignment, gfc_match_pointer_assignment, gfc_match_if, gfc_match_do, gfc_match_nullify, gfc_match_call, match_implicit_range, gfc_match_implicit, gfc_match_data, match_case_selector, gfc_match_case, match_forall_iterator): Likewise. * matchexp.c (gfc_match_defined_op_name, next_operator, match_level_1, match_mult_operand, match_ext_mult_operand, match_add_operand, match_ext_add_operand, match_level_2, match_level_3, match_level_4, match_and_operand, match_or_operand, match_equiv_operand, match_level_5, gfc_match_expr): Likewise. * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise. * parse.c (match_word, decode_statement, next_free, next_fixed, add_statement, verify_st_order, parse_if_block, gfc_parse_file): Likewise. * primary.c (match_digits, match_integer_constant, match_boz_constant, match_real_constant, match_substring, next_string_char, match_charkind_name, match_string_constant, match_logical_constant, match_const_complex_part, match_complex_constant, match_actual_arg, match_keyword_arg, gfc_match_actual_arglist, gfc_match_structure_constructor, gfc_match_rvalue, gfc_match_variable): Likewise. * st.c (gfc_get_code): Likewise. * symbol.c (check_conflict, check_used, check_done, duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent, gfc_add_access, gfc_add_explicit_interface, gfc_add_type, gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82320 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/decl.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'gcc/fortran/decl.c') diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 84547a4f750..69b1cfdb5c3 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -423,7 +423,7 @@ gfc_match_null (gfc_expr ** result) return MATCH_ERROR; e = gfc_get_expr (); - e->where = *gfc_current_locus (); + e->where = gfc_current_locus; e->expr_type = EXPR_NULL; e->ts.type = BT_UNKNOWN; @@ -459,7 +459,7 @@ variable_decl (void) if (m != MATCH_YES) goto cleanup; - var_locus = *gfc_current_locus (); + var_locus = gfc_current_locus; /* Now we could see the optional array spec. or character length. */ m = gfc_match_array_spec (&as); @@ -659,7 +659,7 @@ gfc_match_kind_spec (gfc_typespec * ts) m = MATCH_NO; e = NULL; - where = *gfc_current_locus (); + where = gfc_current_locus; if (gfc_match_char ('(') == MATCH_NO) return MATCH_NO; @@ -711,7 +711,7 @@ gfc_match_kind_spec (gfc_typespec * ts) no_match: gfc_free_expr (e); - gfc_set_locus (&where); + gfc_current_locus = where; return m; } @@ -1028,7 +1028,7 @@ match_attr_spec (void) try t; gfc_clear_attr (¤t_attr); - start = *gfc_current_locus (); + start = gfc_current_locus; current_as = NULL; colon_seen = 0; @@ -1044,7 +1044,7 @@ match_attr_spec (void) break; seen[d]++; - seen_at[d] = *gfc_current_locus (); + seen_at[d] = gfc_current_locus; if (d == DECL_DIMENSION) { @@ -1218,7 +1218,7 @@ match_attr_spec (void) return MATCH_YES; cleanup: - gfc_set_locus (&start); + gfc_current_locus = start; gfc_free_array_spec (current_as); current_as = NULL; return m; @@ -1558,18 +1558,18 @@ gfc_match_function_decl (void) gfc_clear_ts (¤t_ts); - old_loc = *gfc_current_locus (); + old_loc = gfc_current_locus; m = match_prefix (¤t_ts); if (m != MATCH_YES) { - gfc_set_locus (&old_loc); + gfc_current_locus = old_loc; return m; } if (gfc_match ("function% %n", name) != MATCH_YES) { - gfc_set_locus (&old_loc); + gfc_current_locus = old_loc; return MATCH_NO; } @@ -1630,7 +1630,7 @@ gfc_match_function_decl (void) return MATCH_YES; cleanup: - gfc_set_locus (&old_loc); + gfc_current_locus = old_loc; return m; } @@ -1790,7 +1790,7 @@ gfc_match_end (gfc_statement * st) const char *target; match m; - old_loc = *gfc_current_locus (); + old_loc = gfc_current_locus; if (gfc_match ("end") != MATCH_YES) return MATCH_NO; @@ -1943,7 +1943,7 @@ syntax: gfc_syntax_error (*st); cleanup: - gfc_set_locus (&old_loc); + gfc_current_locus = old_loc; return MATCH_ERROR; } @@ -1971,7 +1971,7 @@ attr_decl1 (void) if (find_special (name, &sym)) return MATCH_ERROR; - var_locus = *gfc_current_locus (); + var_locus = gfc_current_locus; /* Deal with possible array specification for certain attributes. */ if (current_attr.dimension @@ -2423,7 +2423,7 @@ gfc_match_save (void) switch (m) { case MATCH_YES: - if (gfc_add_save (&sym->attr, gfc_current_locus ()) == FAILURE) + if (gfc_add_save (&sym->attr, &gfc_current_locus) == FAILURE) return MATCH_ERROR; goto next_item; -- cgit v1.2.3