diff options
author | Bernhard Fischer <rep.nop@aon.at> | 2005-12-01 00:57:44 +0100 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2005-11-30 23:57:44 +0000 |
commit | 16ab8e74dad98cca30b431ae68b3926fe897aab4 (patch) | |
tree | 2c79d3d03822356a4f0ab0c7c7b6c42b8f03862a /gcc/fortran/options.c | |
parent | 4b860192e48ff466dc4975c9212e61e621fdb103 (diff) | |
download | gcc-16ab8e74dad98cca30b431ae68b3926fe897aab4.zip gcc-16ab8e74dad98cca30b431ae68b3926fe897aab4.tar.gz gcc-16ab8e74dad98cca30b431ae68b3926fe897aab4.tar.bz2 |
re PR fortran/21302 (Max line length in free form mode)
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.
From-SVN: r107745
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 a39876b..64fa8a2 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", |