summaryrefslogtreecommitdiff
path: root/gcc/fortran/f95-lang.c
diff options
context:
space:
mode:
authortobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-21 15:28:27 +0000
committertobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-21 15:28:27 +0000
commit8594da07c737709108e6a615dd73820d36658a77 (patch)
tree6d78660a99f1d6307abbfb89d8b2c30df09ad74e /gcc/fortran/f95-lang.c
parent1088b1d13853896c2ccaf2a9d6632d6c18d7f4e3 (diff)
downloadgcc-8594da07c737709108e6a615dd73820d36658a77.tar.gz
fortran/
* gfortran.h (gfc_option_t): Remove source field. Add flag_d_lines field. (gfc_new_file): Remove arguments in prototype. (gfc_source_file): Make 'const char *'. * f95-lang.c (gfc_init): Use gfc_source_file instead of gfc_option.source. Call gfc_new_file without arguments. * invoke.texi: Document new options '-fd-lines-as-code' and '-fd-lines-as-comment'. * lang.opt: Add new options. Alphabetize. * options.c (gfc_init_options): Initialize gfc_source_file instead of gfc_option.source. Initialize gfc_option.flag_d_lines. (form_from_filename): Move here from scanner.c. Make 'filename' argument 'const'. (gfc_post_options): Set gfc_source_file. Determine source form. Warn if 'd-lines*' are used in free form. * scanner.c (gfc_source_file): Constify. (skip_fixed_comments): Deal with d-lines. (get_file): Constify argument 'name'. (load_file): Constify argument 'filename'. (form_from_filename): Moved to options.c. (gfc_new_file): Remove arguments. Don't initialize gfc_source_file, don't determine source form. * trans-const.c (gfc_init_constants): Use gfc_source_file instead of gfc_option.source. testsuite/ * d_lines_1.f, d_lines_2.f, d_lines_3.f, d_lines_4.f, d_lines_5.f: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103322 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/f95-lang.c')
-rw-r--r--gcc/fortran/f95-lang.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index 1c16bb454bb..6e607e9fa8e 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -271,7 +271,7 @@ static bool
gfc_init (void)
{
#ifdef USE_MAPPED_LOCATION
- linemap_add (&line_table, LC_ENTER, false, gfc_option.source, 1);
+ linemap_add (&line_table, LC_ENTER, false, gfc_source_file, 1);
linemap_add (&line_table, LC_RENAME, false, "<built-in>", 0);
#endif
@@ -282,8 +282,8 @@ gfc_init (void)
/* Then the frontend. */
gfc_init_1 ();
- if (gfc_new_file (gfc_option.source, gfc_option.source_form) != SUCCESS)
- fatal_error ("can't open input file: %s", gfc_option.source);
+ if (gfc_new_file () != SUCCESS)
+ fatal_error ("can't open input file: %s", gfc_source_file);
return true;
}