diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2003-05-03 16:39:50 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2003-05-03 16:39:50 +0000 |
commit | 31423e30eeeb688c09434451706da181ad17ac2b (patch) | |
tree | 0d5819f6b3ce73d7fa9752f37cbda68842d32200 /gcc/f/lex.c | |
parent | 5a43f8c419e41730a6d6cf824395f1de2fa9dd9e (diff) | |
download | gcc-31423e30eeeb688c09434451706da181ad17ac2b.zip gcc-31423e30eeeb688c09434451706da181ad17ac2b.tar.gz gcc-31423e30eeeb688c09434451706da181ad17ac2b.tar.bz2 |
com.c (ffecom_do_entry_): Use location_t and input_location directly.
* com.c (ffecom_do_entry_): Use location_t and input_location
directly.
(ffecom_gen_sfuncdef_): Likewise.
(ffecom_start_progunit_): Likewise.
(ffecom_sym_transform_): Likewise.
(ffecom_sym_transform_assign_): Likewise.
* lex.c (ffelex_hash_): Likewise.
(ffelex_include_): Likewise.
* std.c (ffestd_exec_begin): Likewise.
(ffestd_exec_end): Likewise.
* ste.c (struct gbe_block): Likewise.
(ffeste_start_block_): Likewise.
(ffeste_start_stmt_): Likewise.
From-SVN: r66432
Diffstat (limited to 'gcc/f/lex.c')
-rw-r--r-- | gcc/f/lex.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc/f/lex.c b/gcc/f/lex.c index abdea33..0c1fdaf 100644 --- a/gcc/f/lex.c +++ b/gcc/f/lex.c @@ -1193,8 +1193,7 @@ ffelex_hash_ (FILE *finput) if ((token != NULL) && (ffelex_token_type (token) == FFELEX_typeNUMBER)) { - int old_lineno = input_line; - const char *old_input_filename = input_filename; + location_t old_loc = input_location; ffewhereFile wf; /* subtract one, because it is the following line that @@ -1281,14 +1280,14 @@ ffelex_hash_ (FILE *finput) if (ffelex_kludge_flag_) { input_line = 1; - input_filename = old_input_filename; + input_filename = old_loc.file; error ("use `#line ...' instead of `# ...' in first line"); } if (num == 1) { /* Pushing to a new file. */ - ffelex_file_push_ (old_lineno, input_filename); + ffelex_file_push_ (old_loc.line, input_filename); } else if (num == 2) { @@ -1325,7 +1324,7 @@ ffelex_hash_ (FILE *finput) && ffelex_kludge_flag_) { input_line = 1; - input_filename = old_input_filename; + input_filename = old_loc.file; error ("use `#line ...' instead of `# ...' in first line"); } if (c == '\n' || c == EOF) @@ -1470,8 +1469,7 @@ ffelex_include_ () ffewhereLineNumber linecount_current = ffelex_linecount_current_; ffewhereLineNumber linecount_offset = ffewhere_line_filelinenum (current_wl); - int old_lineno = input_line; - const char *old_input_filename = input_filename; + location_t old_loc = input_location; if (card_length != 0) { @@ -1489,7 +1487,7 @@ ffelex_include_ () ffewhere_file_set (include_wherefile, TRUE, 0); - ffelex_file_push_ (old_lineno, ffewhere_file_name (include_wherefile)); + ffelex_file_push_ (old_loc.line, ffewhere_file_name (include_wherefile)); if (ffelex_include_free_form_) ffelex_file_free (include_wherefile, include_file); @@ -1512,8 +1510,7 @@ ffelex_include_ () } ffelex_card_image_[card_length] = '\0'; - input_filename = old_input_filename; - input_line = old_lineno; + input_location = old_loc; ffelex_linecount_current_ = linecount_current; ffelex_current_wf_ = current_wf; ffelex_final_nontab_column_ = final_nontab_column; |