diff options
author | Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> | 2004-05-27 14:35:12 +0200 |
---|---|---|
committer | Tobias Schlüter <tobi@gcc.gnu.org> | 2004-05-27 14:35:12 +0200 |
commit | 63645982e7f5d9d95f152052431db81c2f119a15 (patch) | |
tree | 3c7af6dcd25c3b7df4df9f719eb578e68eb49801 /gcc/fortran/io.c | |
parent | a4171ce18efea96907998485b2a71e3d4f9dde4f (diff) | |
download | gcc-63645982e7f5d9d95f152052431db81c2f119a15.zip gcc-63645982e7f5d9d95f152052431db81c2f119a15.tar.gz gcc-63645982e7f5d9d95f152052431db81c2f119a15.tar.bz2 |
gfortran.h (gfc_current_locus, [...]): Remove.
* 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.
From-SVN: r82320
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r-- | gcc/fortran/io.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 9e860d8..56cbe87 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -819,7 +819,7 @@ gfc_match_format (void) mode = MODE_FORMAT; format_length = 0; - start = *gfc_current_locus (); + start = gfc_current_locus; if (check_format () == FAILURE) return MATCH_ERROR; @@ -833,7 +833,7 @@ gfc_match_format (void) /* The label doesn't get created until after the statement is done being matched, so we have to leave the string for later. */ - gfc_set_locus (&start); /* Back to the beginning */ + gfc_current_locus = start; /* Back to the beginning */ new_st.loc = start; new_st.op = EXEC_NOP; @@ -1480,7 +1480,7 @@ match_dt_format (gfc_dt * dt) gfc_expr *e; gfc_st_label *label; - where = *gfc_current_locus (); + where = gfc_current_locus; if (gfc_match_char ('*') == MATCH_YES) { @@ -1520,7 +1520,7 @@ match_dt_format (gfc_dt * dt) return MATCH_YES; } - gfc_set_locus (&where); /* The only case where we have to restore */ + gfc_current_locus = where; /* The only case where we have to restore */ return MATCH_NO; @@ -1617,13 +1617,13 @@ match_dt_element (io_kind k, gfc_dt * dt) m = match_ltag (&tag_end, &dt->end); if (m == MATCH_YES) - dt->end_where = *gfc_current_locus (); + dt->end_where = gfc_current_locus; if (m != MATCH_NO) return m; m = match_ltag (&tag_eor, &dt->eor); if (m == MATCH_YES) - dt->eor_where = *gfc_current_locus (); + dt->eor_where = gfc_current_locus; if (m != MATCH_NO) return m; @@ -1818,7 +1818,7 @@ match_io_iterator (io_kind k, gfc_code ** result) iter = NULL; head = NULL; - old_loc = *gfc_current_locus (); + old_loc = gfc_current_locus; if (gfc_match_char ('(') != MATCH_YES) return MATCH_NO; @@ -1885,7 +1885,7 @@ syntax: cleanup: gfc_free_iterator (iter, 1); gfc_free_statements (head); - gfc_set_locus (&old_loc); + gfc_current_locus = old_loc; return m; } @@ -2093,7 +2093,7 @@ match_io (io_kind k) if (m == MATCH_ERROR) goto cleanup; - where = *gfc_current_locus (); + where = gfc_current_locus; if (gfc_match_name (name) == MATCH_YES && !gfc_find_symbol (name, NULL, 1, &sym) @@ -2108,7 +2108,7 @@ match_io (io_kind k) goto next; } - gfc_set_locus (&where); + gfc_current_locus = where; goto loop; /* No matches, try regular elements */ |