1 /* Parse and display command line options.
2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
4 Free Software Foundation, Inc.
5 Contributed by Andy Vaught
7 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 3, or (at your option) any later
14 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
25 #include "coretypes.h"
32 #include "tree-inline.h"
39 gfc_option_t gfc_option;
42 /* Set flags that control warnings and errors for different
43 Fortran standards to their default values. Keep in sync with
44 libgfortran/runtime/compile_options.c (init_compile_options). */
47 set_default_std_flags (void)
49 gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL
50 | GFC_STD_F2003 | GFC_STD_F2008 | GFC_STD_F95 | GFC_STD_F77
51 | GFC_STD_GNU | GFC_STD_LEGACY;
52 gfc_option.warn_std = GFC_STD_F95_DEL | GFC_STD_LEGACY;
56 /* Get ready for options handling. Keep in sync with
57 libgfortran/runtime/compile_options.c (init_compile_options). */
60 gfc_init_options (unsigned int argc, const char **argv)
62 gfc_source_file = NULL;
63 gfc_option.module_dir = NULL;
64 gfc_option.source_form = FORM_UNKNOWN;
65 gfc_option.fixed_line_length = 72;
66 gfc_option.free_line_length = 132;
67 gfc_option.max_continue_fixed = 255;
68 gfc_option.max_continue_free = 255;
69 gfc_option.max_identifier_length = GFC_MAX_SYMBOL_LEN;
70 gfc_option.max_subrecord_length = 0;
71 gfc_option.flag_max_array_constructor = 65535;
72 gfc_option.convert = GFC_CONVERT_NATIVE;
73 gfc_option.record_marker = 0;
74 gfc_option.dump_parse_tree = 0;
76 gfc_option.warn_aliasing = 0;
77 gfc_option.warn_ampersand = 0;
78 gfc_option.warn_character_truncation = 0;
79 gfc_option.warn_array_temp = 0;
80 gfc_option.warn_conversion = 0;
81 gfc_option.warn_implicit_interface = 0;
82 gfc_option.warn_line_truncation = 0;
83 gfc_option.warn_surprising = 0;
84 gfc_option.warn_tabs = 1;
85 gfc_option.warn_underflow = 1;
86 gfc_option.warn_intrinsic_shadow = 0;
87 gfc_option.warn_intrinsics_std = 0;
88 gfc_option.warn_align_commons = 1;
89 gfc_option.max_errors = 25;
91 gfc_option.flag_all_intrinsics = 0;
92 gfc_option.flag_default_double = 0;
93 gfc_option.flag_default_integer = 0;
94 gfc_option.flag_default_real = 0;
95 gfc_option.flag_dollar_ok = 0;
96 gfc_option.flag_underscoring = 1;
97 gfc_option.flag_whole_file = 0;
98 gfc_option.flag_f2c = 0;
99 gfc_option.flag_second_underscore = -1;
100 gfc_option.flag_implicit_none = 0;
102 /* Default value of flag_max_stack_var_size is set in gfc_post_options. */
103 gfc_option.flag_max_stack_var_size = -2;
105 gfc_option.flag_range_check = 1;
106 gfc_option.flag_pack_derived = 0;
107 gfc_option.flag_repack_arrays = 0;
108 gfc_option.flag_preprocessed = 0;
109 gfc_option.flag_automatic = 1;
110 gfc_option.flag_backslash = 0;
111 gfc_option.flag_module_private = 0;
112 gfc_option.flag_backtrace = 0;
113 gfc_option.flag_allow_leading_underscore = 0;
114 gfc_option.flag_dump_core = 0;
115 gfc_option.flag_external_blas = 0;
116 gfc_option.blas_matmul_limit = 30;
117 gfc_option.flag_cray_pointer = 0;
118 gfc_option.flag_d_lines = -1;
119 gfc_option.flag_openmp = 0;
120 gfc_option.flag_sign_zero = 1;
121 gfc_option.flag_recursive = 0;
122 gfc_option.flag_init_integer = GFC_INIT_INTEGER_OFF;
123 gfc_option.flag_init_integer_value = 0;
124 gfc_option.flag_init_real = GFC_INIT_REAL_OFF;
125 gfc_option.flag_init_logical = GFC_INIT_LOGICAL_OFF;
126 gfc_option.flag_init_character = GFC_INIT_CHARACTER_OFF;
127 gfc_option.flag_init_character_value = (char)0;
128 gfc_option.flag_align_commons = 1;
129 gfc_option.flag_protect_parens = 1;
132 gfc_option.rtcheck = 0;
133 gfc_option.coarray = GFC_FCOARRAY_NONE;
135 /* Argument pointers cannot point to anything but their argument. */
136 flag_argument_noalias = 3;
140 set_default_std_flags ();
142 /* -fshort-enums can be default on some targets. */
143 flag_short_enums = targetm.default_short_enums ();
145 /* Initialize cpp-related options. */
146 gfc_cpp_init_options(argc, argv);
152 /* Determine the source form from the filename extension. We assume
153 case insensitivity. */
155 static gfc_source_form
156 form_from_filename (const char *filename)
160 const char *extension;
161 gfc_source_form form;
188 }; /* sentinel value */
190 gfc_source_form f_form;
194 /* Find end of file name. Note, filename is either a NULL pointer or
195 a NUL terminated string. */
197 while (filename[i] != '\0')
200 /* Find last period. */
201 while (i >= 0 && (filename[i] != '.'))
204 /* Did we see a file extension? */
206 return FORM_UNKNOWN; /* Nope */
208 /* Get file extension and compare it to others. */
209 fileext = &(filename[i]);
212 f_form = FORM_UNKNOWN;
216 if (strcasecmp (fileext, exttype[i].extension) == 0)
218 f_form = exttype[i].form;
222 while (exttype[i].form != FORM_UNKNOWN);
228 /* Finalize commandline options. */
231 gfc_post_options (const char **pfilename)
233 const char *filename = *pfilename, *canon_source_file = NULL;
237 /* Excess precision other than "fast" requires front-end
239 if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD
240 && TARGET_FLT_EVAL_METHOD_NON_DEFAULT)
241 sorry ("-fexcess-precision=standard for Fortran");
242 flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
244 /* Whole program needs whole file mode. */
245 if (flag_whole_program)
246 gfc_option.flag_whole_file = 1;
248 /* Enable whole-file mode if LTO is in effect. */
249 if (flag_lto || flag_whopr)
250 gfc_option.flag_whole_file = 1;
252 /* -fbounds-check is equivalent to -fcheck=bounds */
253 if (flag_bounds_check)
254 gfc_option.rtcheck |= GFC_RTCHECK_BOUNDS;
256 if (flag_compare_debug)
257 gfc_option.dump_parse_tree = 0;
259 /* Verify the input file name. */
260 if (!filename || strcmp (filename, "-") == 0)
265 if (gfc_option.flag_preprocessed)
267 /* For preprocessed files, if the first tokens are of the form # NUM.
268 handle the directives so we know the original file name. */
269 gfc_source_file = gfc_read_orig_filename (filename, &canon_source_file);
270 if (gfc_source_file == NULL)
271 gfc_source_file = filename;
273 *pfilename = gfc_source_file;
276 gfc_source_file = filename;
278 if (canon_source_file == NULL)
279 canon_source_file = gfc_source_file;
281 /* Adds the path where the source file is to the list of include files. */
283 i = strlen (canon_source_file);
284 while (i > 0 && !IS_DIR_SEPARATOR (canon_source_file[i]))
289 source_path = (char *) alloca (i + 1);
290 memcpy (source_path, canon_source_file, i);
292 gfc_add_include_path (source_path, true, true);
295 gfc_add_include_path (".", true, true);
297 if (canon_source_file != gfc_source_file)
298 gfc_free (CONST_CAST (char *, canon_source_file));
300 /* Decide which form the file will be read in as. */
302 if (gfc_option.source_form != FORM_UNKNOWN)
303 gfc_current_form = gfc_option.source_form;
306 gfc_current_form = form_from_filename (filename);
308 if (gfc_current_form == FORM_UNKNOWN)
310 gfc_current_form = FORM_FREE;
311 gfc_warning_now ("Reading file '%s' as free form",
312 (filename[0] == '\0') ? "<stdin>" : filename);
316 /* If the user specified -fd-lines-as-{code|comments} verify that we're
318 if (gfc_current_form == FORM_FREE)
320 if (gfc_option.flag_d_lines == 0)
321 gfc_warning_now ("'-fd-lines-as-comments' has no effect "
323 else if (gfc_option.flag_d_lines == 1)
324 gfc_warning_now ("'-fd-lines-as-code' has no effect in free form");
327 /* If -pedantic, warn about the use of GNU extensions. */
328 if (pedantic && (gfc_option.allow_std & GFC_STD_GNU) != 0)
329 gfc_option.warn_std |= GFC_STD_GNU;
330 /* -std=legacy -pedantic is effectively -std=gnu. */
331 if (pedantic && (gfc_option.allow_std & GFC_STD_LEGACY) != 0)
332 gfc_option.warn_std |= GFC_STD_F95_OBS | GFC_STD_F95_DEL | GFC_STD_LEGACY;
334 /* If the user didn't explicitly specify -f(no)-second-underscore we
335 use it if we're trying to be compatible with f2c, and not
337 if (gfc_option.flag_second_underscore == -1)
338 gfc_option.flag_second_underscore = gfc_option.flag_f2c;
340 if (!gfc_option.flag_automatic && gfc_option.flag_max_stack_var_size != -2
341 && gfc_option.flag_max_stack_var_size != 0)
342 gfc_warning_now ("Flag -fno-automatic overwrites -fmax-stack-var-size=%d",
343 gfc_option.flag_max_stack_var_size);
344 else if (!gfc_option.flag_automatic && gfc_option.flag_recursive)
345 gfc_warning_now ("Flag -fno-automatic overwrites -frecursive");
346 else if (!gfc_option.flag_automatic && gfc_option.flag_openmp)
347 gfc_warning_now ("Flag -fno-automatic overwrites -frecursive implied by "
349 else if (gfc_option.flag_max_stack_var_size != -2
350 && gfc_option.flag_recursive)
351 gfc_warning_now ("Flag -frecursive overwrites -fmax-stack-var-size=%d",
352 gfc_option.flag_max_stack_var_size);
353 else if (gfc_option.flag_max_stack_var_size != -2
354 && gfc_option.flag_openmp)
355 gfc_warning_now ("Flag -fmax-stack-var-size=%d overwrites -frecursive "
356 "implied by -fopenmp",
357 gfc_option.flag_max_stack_var_size);
359 /* Implement -frecursive as -fmax-stack-var-size=-1. */
360 if (gfc_option.flag_recursive)
361 gfc_option.flag_max_stack_var_size = -1;
363 /* Implied -frecursive; implemented as -fmax-stack-var-size=-1. */
364 if (gfc_option.flag_max_stack_var_size == -2 && gfc_option.flag_openmp
365 && gfc_option.flag_automatic)
367 gfc_option.flag_recursive = 1;
368 gfc_option.flag_max_stack_var_size = -1;
372 if (gfc_option.flag_max_stack_var_size == -2)
373 gfc_option.flag_max_stack_var_size = 32768;
375 /* Implement -fno-automatic as -fmax-stack-var-size=0. */
376 if (!gfc_option.flag_automatic)
377 gfc_option.flag_max_stack_var_size = 0;
381 gfc_option.warn_ampersand = 1;
382 gfc_option.warn_tabs = 0;
385 if (pedantic && gfc_option.flag_whole_file)
386 gfc_option.flag_whole_file = 2;
388 gfc_cpp_post_options ();
390 /* FIXME: return gfc_cpp_preprocess_only ();
392 The return value of this function indicates whether the
393 backend needs to be initialized. On -E, we don't need
394 the backend. However, if we return 'true' here, an
395 ICE occurs. Initializing the backend doesn't hurt much,
396 hence, for now we can live with it as is. */
401 /* Set the options for -Wall. */
404 set_Wall (int setting)
406 gfc_option.warn_aliasing = setting;
407 gfc_option.warn_ampersand = setting;
408 gfc_option.warn_line_truncation = setting;
409 gfc_option.warn_surprising = setting;
410 gfc_option.warn_tabs = !setting;
411 gfc_option.warn_underflow = setting;
412 gfc_option.warn_intrinsic_shadow = setting;
413 gfc_option.warn_intrinsics_std = setting;
414 gfc_option.warn_character_truncation = setting;
416 warn_unused = setting;
417 warn_return_type = setting;
418 warn_switch = setting;
420 /* We save the value of warn_uninitialized, since if they put
421 -Wuninitialized on the command line, we need to generate a
422 warning about not using it without also specifying -O. */
424 warn_uninitialized = 0;
425 else if (warn_uninitialized != 1)
426 warn_uninitialized = 2;
431 gfc_handle_module_path_options (const char *arg)
434 if (gfc_option.module_dir != NULL)
435 gfc_fatal_error ("gfortran: Only one -J option allowed");
437 gfc_option.module_dir = (char *) gfc_getmem (strlen (arg) + 2);
438 strcpy (gfc_option.module_dir, arg);
439 strcat (gfc_option.module_dir, "/");
441 gfc_add_include_path (gfc_option.module_dir, true, false);
446 gfc_handle_fpe_trap_option (const char *arg)
448 int result, pos = 0, n;
449 static const char * const exception[] = { "invalid", "denormal", "zero",
450 "overflow", "underflow",
452 static const int opt_exception[] = { GFC_FPE_INVALID, GFC_FPE_DENORMAL,
453 GFC_FPE_ZERO, GFC_FPE_OVERFLOW,
454 GFC_FPE_UNDERFLOW, GFC_FPE_PRECISION,
462 while (arg[pos] && arg[pos] != ',')
466 for (n = 0; exception[n] != NULL; n++)
468 if (exception[n] && strncmp (exception[n], arg, pos) == 0)
470 gfc_option.fpe |= opt_exception[n];
478 gfc_fatal_error ("Argument to -ffpe-trap is not valid: %s", arg);
484 gfc_handle_coarray_option (const char *arg)
486 if (strcmp (arg, "none") == 0)
487 gfc_option.coarray = GFC_FCOARRAY_NONE;
488 else if (strcmp (arg, "single") == 0)
489 gfc_option.coarray = GFC_FCOARRAY_SINGLE;
491 gfc_fatal_error ("Argument to -fcoarray is not valid: %s", arg);
496 gfc_handle_runtime_check_option (const char *arg)
498 int result, pos = 0, n;
499 static const char * const optname[] = { "all", "bounds", "array-temps",
500 "recursion", "do", "pointer",
502 static const int optmask[] = { GFC_RTCHECK_ALL, GFC_RTCHECK_BOUNDS,
503 GFC_RTCHECK_ARRAY_TEMPS,
504 GFC_RTCHECK_RECURSION, GFC_RTCHECK_DO,
505 GFC_RTCHECK_POINTER, GFC_RTCHECK_MEM,
513 while (arg[pos] && arg[pos] != ',')
517 for (n = 0; optname[n] != NULL; n++)
519 if (optname[n] && strncmp (optname[n], arg, pos) == 0)
521 gfc_option.rtcheck |= optmask[n];
529 gfc_fatal_error ("Argument to -fcheck is not valid: %s", arg);
534 /* Handle command-line options. Returns 0 if unrecognized, 1 if
535 recognized and handled. */
538 gfc_handle_option (size_t scode, const char *arg, int value)
541 enum opt_code code = (enum opt_code) scode;
543 /* Ignore file names. */
547 if (gfc_cpp_handle_option (scode, arg, value) == 1)
561 gfc_option.warn_aliasing = value;
565 gfc_option.warn_ampersand = value;
568 case OPT_Warray_temporaries:
569 gfc_option.warn_array_temp = value;
572 case OPT_Wcharacter_truncation:
573 gfc_option.warn_character_truncation = value;
576 case OPT_Wconversion:
577 gfc_option.warn_conversion = value;
580 case OPT_Wimplicit_interface:
581 gfc_option.warn_implicit_interface = value;
584 case OPT_Wimplicit_procedure:
585 gfc_option.warn_implicit_procedure = value;
588 case OPT_Wline_truncation:
589 gfc_option.warn_line_truncation = value;
592 case OPT_Wreturn_type:
593 warn_return_type = value;
596 case OPT_Wsurprising:
597 gfc_option.warn_surprising = value;
601 gfc_option.warn_tabs = value;
605 gfc_option.warn_underflow = value;
608 case OPT_Wintrinsic_shadow:
609 gfc_option.warn_intrinsic_shadow = value;
612 case OPT_Walign_commons:
613 gfc_option.warn_align_commons = value;
616 case OPT_fall_intrinsics:
617 gfc_option.flag_all_intrinsics = 1;
621 gfc_option.flag_automatic = value;
624 case OPT_fallow_leading_underscore:
625 gfc_option.flag_allow_leading_underscore = value;
629 gfc_option.flag_backslash = value;
633 gfc_option.flag_backtrace = value;
636 case OPT_fcheck_array_temporaries:
637 gfc_option.rtcheck |= GFC_RTCHECK_ARRAY_TEMPS;
641 gfc_option.flag_dump_core = value;
644 case OPT_fcray_pointer:
645 gfc_option.flag_cray_pointer = value;
649 gfc_option.flag_f2c = value;
653 gfc_option.flag_dollar_ok = value;
656 case OPT_fexternal_blas:
657 gfc_option.flag_external_blas = value;
660 case OPT_fblas_matmul_limit_:
661 gfc_option.blas_matmul_limit = value;
664 case OPT_fd_lines_as_code:
665 gfc_option.flag_d_lines = 1;
668 case OPT_fd_lines_as_comments:
669 gfc_option.flag_d_lines = 0;
672 case OPT_fdump_parse_tree:
673 gfc_option.dump_parse_tree = value;
676 case OPT_ffixed_form:
677 gfc_option.source_form = FORM_FIXED;
680 case OPT_ffixed_line_length_none:
681 gfc_option.fixed_line_length = 0;
684 case OPT_ffixed_line_length_:
685 if (value != 0 && value < 7)
686 gfc_fatal_error ("Fixed line length must be at least seven.");
687 gfc_option.fixed_line_length = value;
691 gfc_option.source_form = FORM_FREE;
695 gfc_option.flag_openmp = value;
698 case OPT_ffree_line_length_none:
699 gfc_option.free_line_length = 0;
702 case OPT_ffree_line_length_:
703 if (value != 0 && value < 4)
704 gfc_fatal_error ("Free line length must be at least three.");
705 gfc_option.free_line_length = value;
708 case OPT_funderscoring:
709 gfc_option.flag_underscoring = value;
712 case OPT_fwhole_file:
713 gfc_option.flag_whole_file = 1;
716 case OPT_fsecond_underscore:
717 gfc_option.flag_second_underscore = value;
720 case OPT_static_libgfortran:
721 #ifndef HAVE_LD_STATIC_DYNAMIC
722 gfc_fatal_error ("-static-libgfortran is not supported in this "
727 case OPT_fimplicit_none:
728 gfc_option.flag_implicit_none = value;
731 case OPT_fintrinsic_modules_path:
732 gfc_add_include_path (arg, false, false);
733 gfc_add_intrinsic_modules_path (arg);
736 case OPT_fmax_array_constructor_:
737 gfc_option.flag_max_array_constructor = value > 65535 ? value : 65535;
740 case OPT_fmax_errors_:
741 gfc_option.max_errors = value;
744 case OPT_fmax_stack_var_size_:
745 gfc_option.flag_max_stack_var_size = value;
748 case OPT_fmodule_private:
749 gfc_option.flag_module_private = value;
752 case OPT_frange_check:
753 gfc_option.flag_range_check = value;
756 case OPT_fpack_derived:
757 gfc_option.flag_pack_derived = value;
760 case OPT_frepack_arrays:
761 gfc_option.flag_repack_arrays = value;
764 case OPT_fpreprocessed:
765 gfc_option.flag_preprocessed = value;
768 case OPT_fmax_identifier_length_:
769 if (value > GFC_MAX_SYMBOL_LEN)
770 gfc_fatal_error ("Maximum supported identifier length is %d",
772 gfc_option.max_identifier_length = value;
775 case OPT_fdefault_integer_8:
776 gfc_option.flag_default_integer = value;
779 case OPT_fdefault_real_8:
780 gfc_option.flag_default_real = value;
783 case OPT_fdefault_double_8:
784 gfc_option.flag_default_double = value;
787 case OPT_finit_local_zero:
788 gfc_option.flag_init_integer = GFC_INIT_INTEGER_ON;
789 gfc_option.flag_init_integer_value = 0;
790 gfc_option.flag_init_real = GFC_INIT_REAL_ZERO;
791 gfc_option.flag_init_logical = GFC_INIT_LOGICAL_FALSE;
792 gfc_option.flag_init_character = GFC_INIT_CHARACTER_ON;
793 gfc_option.flag_init_character_value = (char)0;
796 case OPT_finit_logical_:
797 if (!strcasecmp (arg, "false"))
798 gfc_option.flag_init_logical = GFC_INIT_LOGICAL_FALSE;
799 else if (!strcasecmp (arg, "true"))
800 gfc_option.flag_init_logical = GFC_INIT_LOGICAL_TRUE;
802 gfc_fatal_error ("Unrecognized option to -finit-logical: %s",
806 case OPT_finit_real_:
807 if (!strcasecmp (arg, "zero"))
808 gfc_option.flag_init_real = GFC_INIT_REAL_ZERO;
809 else if (!strcasecmp (arg, "nan"))
810 gfc_option.flag_init_real = GFC_INIT_REAL_NAN;
811 else if (!strcasecmp (arg, "snan"))
812 gfc_option.flag_init_real = GFC_INIT_REAL_SNAN;
813 else if (!strcasecmp (arg, "inf"))
814 gfc_option.flag_init_real = GFC_INIT_REAL_INF;
815 else if (!strcasecmp (arg, "-inf"))
816 gfc_option.flag_init_real = GFC_INIT_REAL_NEG_INF;
818 gfc_fatal_error ("Unrecognized option to -finit-real: %s",
822 case OPT_finit_integer_:
823 gfc_option.flag_init_integer = GFC_INIT_INTEGER_ON;
824 gfc_option.flag_init_integer_value = atoi (arg);
827 case OPT_finit_character_:
828 if (value >= 0 && value <= 127)
830 gfc_option.flag_init_character = GFC_INIT_CHARACTER_ON;
831 gfc_option.flag_init_character_value = (char)value;
834 gfc_fatal_error ("The value of n in -finit-character=n must be "
835 "between 0 and 127");
839 gfc_add_include_path (arg, true, false);
843 gfc_handle_module_path_options (arg);
847 gfc_option.flag_sign_zero = value;
851 gfc_handle_fpe_trap_option (arg);
855 gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95 | GFC_STD_F77;
856 gfc_option.warn_std = GFC_STD_F95_OBS;
857 gfc_option.max_continue_fixed = 19;
858 gfc_option.max_continue_free = 39;
859 gfc_option.max_identifier_length = 31;
860 gfc_option.warn_ampersand = 1;
861 gfc_option.warn_tabs = 0;
865 gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77
866 | GFC_STD_F2003 | GFC_STD_F95;
867 gfc_option.warn_std = GFC_STD_F95_OBS;
868 gfc_option.max_identifier_length = 63;
869 gfc_option.warn_ampersand = 1;
870 gfc_option.warn_tabs = 0;
874 gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77
875 | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008;
876 gfc_option.warn_std = GFC_STD_F95_OBS;
877 gfc_option.max_identifier_length = 63;
878 gfc_option.warn_ampersand = 1;
879 gfc_option.warn_tabs = 0;
883 set_default_std_flags ();
887 set_default_std_flags ();
888 gfc_option.warn_std = 0;
891 case OPT_Wintrinsics_std:
892 gfc_option.warn_intrinsics_std = value;
895 case OPT_fshort_enums:
896 flag_short_enums = 1;
899 case OPT_fconvert_little_endian:
900 gfc_option.convert = GFC_CONVERT_LITTLE;
903 case OPT_fconvert_big_endian:
904 gfc_option.convert = GFC_CONVERT_BIG;
907 case OPT_fconvert_native:
908 gfc_option.convert = GFC_CONVERT_NATIVE;
911 case OPT_fconvert_swap:
912 gfc_option.convert = GFC_CONVERT_SWAP;
915 case OPT_frecord_marker_4:
916 gfc_option.record_marker = 4;
919 case OPT_frecord_marker_8:
920 gfc_option.record_marker = 8;
923 case OPT_fmax_subrecord_length_:
924 if (value > MAX_SUBRECORD_LENGTH)
925 gfc_fatal_error ("Maximum subrecord length cannot exceed %d",
926 MAX_SUBRECORD_LENGTH);
928 gfc_option.max_subrecord_length = value;
932 gfc_option.flag_recursive = 1;
935 case OPT_falign_commons:
936 gfc_option.flag_align_commons = value;
939 case OPT_fprotect_parens:
940 gfc_option.flag_protect_parens = value;
944 gfc_handle_runtime_check_option (arg);
948 gfc_handle_coarray_option (arg);