diff options
author | kargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-30 23:57:44 +0000 |
---|---|---|
committer | kargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-30 23:57:44 +0000 |
commit | 8301615623327972c6ad5dd1b14ec3d959381d4f (patch) | |
tree | 2c79d3d03822356a4f0ab0c7c7b6c42b8f03862a /gcc/fortran/options.c | |
parent | 3d37b978e5c46b41d7046d0b31ce81ca6c4b42eb (diff) | |
download | gcc-8301615623327972c6ad5dd1b14ec3d959381d4f.tar.gz |
2005-11-30 Bernhard Fischer <rep.nop@aon.at>
PR fortran/21302
* lang.opt: New options -ffree-line-length- and -ffree-line-length-none.
* gfortran.h: Add free_line_length and add description of
free_line_length and fixed_line_length.
* options.c (gfc_init_options, gfc_handle_option): Initialize
and set free_line_length and fixed_line_length.
* scanner.c (load_line): Set free_line_length to 132 and
fixed_line_length to 72 or user requested values.
* scanner.c: Typo in comment.
* invoke.texi: Document -ffree-line-length- and
-ffree-line-length-none
gfortran.dg/line_length_1.f: New test:
gfortran.dg/line_length_2.f90: Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107745 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/options.c')
-rw-r--r-- | gcc/fortran/options.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index a39876b80b5..64fa8a27441 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -46,7 +46,8 @@ gfc_init_options (unsigned int argc ATTRIBUTE_UNUSED, gfc_source_file = NULL; gfc_option.module_dir = NULL; gfc_option.source_form = FORM_UNKNOWN; - gfc_option.fixed_line_length = 72; + gfc_option.fixed_line_length = -1; + gfc_option.free_line_length = -1; gfc_option.max_identifier_length = GFC_MAX_SYMBOL_LEN; gfc_option.verbose = 0; @@ -423,10 +424,28 @@ gfc_handle_option (size_t scode, const char *arg, int value) gfc_option.source_form = FORM_FIXED; break; + case OPT_ffixed_line_length_none: + gfc_option.fixed_line_length = 0; + break; + + case OPT_ffixed_line_length_: + if (value != 0 && value < 7) + gfc_fatal_error ("Fixed line length must be at least seven."); + gfc_option.fixed_line_length = value; + break; + case OPT_ffree_form: gfc_option.source_form = FORM_FREE; break; + case OPT_ffree_line_length_none: + gfc_option.free_line_length = 0; + break; + + case OPT_ffree_line_length_: + gfc_option.free_line_length = value; + break; + case OPT_funderscoring: gfc_option.flag_underscoring = value; break; @@ -459,16 +478,6 @@ gfc_handle_option (size_t scode, const char *arg, int value) gfc_option.flag_repack_arrays = value; break; - case OPT_ffixed_line_length_none: - gfc_option.fixed_line_length = 0; - break; - - case OPT_ffixed_line_length_: - if (value != 0 && value < 7) - gfc_fatal_error ("Fixed line length must be at least seven."); - gfc_option.fixed_line_length = value; - break; - case OPT_fmax_identifier_length_: if (value > GFC_MAX_SYMBOL_LEN) gfc_fatal_error ("Maximum supported idenitifier length is %d", |