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_conversion_extra = 0;
82 gfc_option.warn_implicit_interface = 0;
83 gfc_option.warn_line_truncation = 0;
84 gfc_option.warn_surprising = 0;
85 gfc_option.warn_tabs = 1;
86 gfc_option.warn_underflow = 1;
87 gfc_option.warn_intrinsic_shadow = 0;
88 gfc_option.warn_intrinsics_std = 0;
89 gfc_option.warn_align_commons = 1;
90 gfc_option.max_errors = 25;
92 gfc_option.flag_all_intrinsics = 0;
93 gfc_option.flag_default_double = 0;
94 gfc_option.flag_default_integer = 0;
95 gfc_option.flag_default_real = 0;
96 gfc_option.flag_dollar_ok = 0;
97 gfc_option.flag_underscoring = 1;
98 gfc_option.flag_whole_file = 0;
99 gfc_option.flag_f2c = 0;
100 gfc_option.flag_second_underscore = -1;
101 gfc_option.flag_implicit_none = 0;
103 /* Default value of flag_max_stack_var_size is set in gfc_post_options. */
104 gfc_option.flag_max_stack_var_size = -2;
106 gfc_option.flag_range_check = 1;
107 gfc_option.flag_pack_derived = 0;
108 gfc_option.flag_repack_arrays = 0;
109 gfc_option.flag_preprocessed = 0;
110 gfc_option.flag_automatic = 1;
111 gfc_option.flag_backslash = 0;
112 gfc_option.flag_module_private = 0;
113 gfc_option.flag_backtrace = 0;
114 gfc_option.flag_allow_leading_underscore = 0;
115 gfc_option.flag_dump_core = 0;
116 gfc_option.flag_external_blas = 0;
117 gfc_option.blas_matmul_limit = 30;
118 gfc_option.flag_cray_pointer = 0;
119 gfc_option.flag_d_lines = -1;
120 gfc_option.flag_openmp = 0;
121 gfc_option.flag_sign_zero = 1;
122 gfc_option.flag_recursive = 0;
123 gfc_option.flag_init_integer = GFC_INIT_INTEGER_OFF;
124 gfc_option.flag_init_integer_value = 0;
125 gfc_option.flag_init_real = GFC_INIT_REAL_OFF;
126 gfc_option.flag_init_logical = GFC_INIT_LOGICAL_OFF;
127 gfc_option.flag_init_character = GFC_INIT_CHARACTER_OFF;
128 gfc_option.flag_init_character_value = (char)0;
129 gfc_option.flag_align_commons = 1;
130 gfc_option.flag_protect_parens = 1;
133 gfc_option.rtcheck = 0;
134 gfc_option.coarray = GFC_FCOARRAY_NONE;
137 flag_associative_math = -1;
139 set_default_std_flags ();
141 /* -fshort-enums can be default on some targets. */
142 flag_short_enums = targetm.default_short_enums ();
144 /* Initialize cpp-related options. */
145 gfc_cpp_init_options(argc, argv);
151 /* Determine the source form from the filename extension. We assume
152 case insensitivity. */
154 static gfc_source_form
155 form_from_filename (const char *filename)
159 const char *extension;
160 gfc_source_form form;
187 }; /* sentinel value */
189 gfc_source_form f_form;
193 /* Find end of file name. Note, filename is either a NULL pointer or
194 a NUL terminated string. */
196 while (filename[i] != '\0')
199 /* Find last period. */
200 while (i >= 0 && (filename[i] != '.'))
203 /* Did we see a file extension? */
205 return FORM_UNKNOWN; /* Nope */
207 /* Get file extension and compare it to others. */
208 fileext = &(filename[i]);
211 f_form = FORM_UNKNOWN;
215 if (strcasecmp (fileext, exttype[i].extension) == 0)
217 f_form = exttype[i].form;
221 while (exttype[i].form != FORM_UNKNOWN);
227 /* Finalize commandline options. */
230 gfc_post_options (const char **pfilename)
232 const char *filename = *pfilename, *canon_source_file = NULL;
236 /* Excess precision other than "fast" requires front-end
238 if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD
239 && TARGET_FLT_EVAL_METHOD_NON_DEFAULT)
240 sorry ("-fexcess-precision=standard for Fortran");
241 flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
243 /* Whole program needs whole file mode. */
244 if (flag_whole_program)
245 gfc_option.flag_whole_file = 1;
247 /* Enable whole-file mode if LTO is in effect. */
248 if (flag_lto || flag_whopr)
249 gfc_option.flag_whole_file = 1;
251 /* Fortran allows associative math - but we cannot reassociate if
252 we want traps or signed zeros. Cf. also flag_protect_parens. */
253 if (flag_associative_math == -1)
254 flag_associative_math = (!flag_trapping_math && !flag_signed_zeros);
256 /* -fbounds-check is equivalent to -fcheck=bounds */
257 if (flag_bounds_check)
258 gfc_option.rtcheck |= GFC_RTCHECK_BOUNDS;
260 if (flag_compare_debug)
261 gfc_option.dump_parse_tree = 0;
263 /* Verify the input file name. */
264 if (!filename || strcmp (filename, "-") == 0)
269 if (gfc_option.flag_preprocessed)
271 /* For preprocessed files, if the first tokens are of the form # NUM.
272 handle the directives so we know the original file name. */
273 gfc_source_file = gfc_read_orig_filename (filename, &canon_source_file);
274 if (gfc_source_file == NULL)
275 gfc_source_file = filename;
277 *pfilename = gfc_source_file;
280 gfc_source_file = filename;
282 if (canon_source_file == NULL)
283 canon_source_file = gfc_source_file;
285 /* Adds the path where the source file is to the list of include files. */
287 i = strlen (canon_source_file);
288 while (i > 0 && !IS_DIR_SEPARATOR (canon_source_file[i]))
293 source_path = (char *) alloca (i + 1);
294 memcpy (source_path, canon_source_file, i);
296 gfc_add_include_path (source_path, true, true);
299 gfc_add_include_path (".", true, true);
301 if (canon_source_file != gfc_source_file)
302 gfc_free (CONST_CAST (char *, canon_source_file));
304 /* Decide which form the file will be read in as. */
306 if (gfc_option.source_form != FORM_UNKNOWN)
307 gfc_current_form = gfc_option.source_form;
310 gfc_current_form = form_from_filename (filename);
312 if (gfc_current_form == FORM_UNKNOWN)
314 gfc_current_form = FORM_FREE;
315 gfc_warning_now ("Reading file '%s' as free form",
316 (filename[0] == '\0') ? "<stdin>" : filename);
320 /* If the user specified -fd-lines-as-{code|comments} verify that we're
322 if (gfc_current_form == FORM_FREE)
324 if (gfc_option.flag_d_lines == 0)
325 gfc_warning_now ("'-fd-lines-as-comments' has no effect "
327 else if (gfc_option.flag_d_lines == 1)
328 gfc_warning_now ("'-fd-lines-as-code' has no effect in free form");
331 /* If -pedantic, warn about the use of GNU extensions. */
332 if (pedantic && (gfc_option.allow_std & GFC_STD_GNU) != 0)
333 gfc_option.warn_std |= GFC_STD_GNU;
334 /* -std=legacy -pedantic is effectively -std=gnu. */
335 if (pedantic && (gfc_option.allow_std & GFC_STD_LEGACY) != 0)
336 gfc_option.warn_std |= GFC_STD_F95_OBS | GFC_STD_F95_DEL | GFC_STD_LEGACY;
338 /* If the user didn't explicitly specify -f(no)-second-underscore we
339 use it if we're trying to be compatible with f2c, and not
341 if (gfc_option.flag_second_underscore == -1)
342 gfc_option.flag_second_underscore = gfc_option.flag_f2c;
344 if (!gfc_option.flag_automatic && gfc_option.flag_max_stack_var_size != -2
345 && gfc_option.flag_max_stack_var_size != 0)
346 gfc_warning_now ("Flag -fno-automatic overwrites -fmax-stack-var-size=%d",
347 gfc_option.flag_max_stack_var_size);
348 else if (!gfc_option.flag_automatic && gfc_option.flag_recursive)
349 gfc_warning_now ("Flag -fno-automatic overwrites -frecursive");
350 else if (!gfc_option.flag_automatic && gfc_option.flag_openmp)
351 gfc_warning_now ("Flag -fno-automatic overwrites -frecursive implied by "
353 else if (gfc_option.flag_max_stack_var_size != -2
354 && gfc_option.flag_recursive)
355 gfc_warning_now ("Flag -frecursive overwrites -fmax-stack-var-size=%d",
356 gfc_option.flag_max_stack_var_size);
357 else if (gfc_option.flag_max_stack_var_size != -2
358 && gfc_option.flag_openmp)
359 gfc_warning_now ("Flag -fmax-stack-var-size=%d overwrites -frecursive "
360 "implied by -fopenmp",
361 gfc_option.flag_max_stack_var_size);
363 /* Implement -frecursive as -fmax-stack-var-size=-1. */
364 if (gfc_option.flag_recursive)
365 gfc_option.flag_max_stack_var_size = -1;
367 /* Implied -frecursive; implemented as -fmax-stack-var-size=-1. */
368 if (gfc_option.flag_max_stack_var_size == -2 && gfc_option.flag_openmp
369 && gfc_option.flag_automatic)
371 gfc_option.flag_recursive = 1;
372 gfc_option.flag_max_stack_var_size = -1;
376 if (gfc_option.flag_max_stack_var_size == -2)
377 gfc_option.flag_max_stack_var_size = 32768;
379 /* Implement -fno-automatic as -fmax-stack-var-size=0. */
380 if (!gfc_option.flag_automatic)
381 gfc_option.flag_max_stack_var_size = 0;
385 gfc_option.warn_ampersand = 1;
386 gfc_option.warn_tabs = 0;
389 if (pedantic && gfc_option.flag_whole_file)
390 gfc_option.flag_whole_file = 2;
392 gfc_cpp_post_options ();
394 /* FIXME: return gfc_cpp_preprocess_only ();
396 The return value of this function indicates whether the
397 backend needs to be initialized. On -E, we don't need
398 the backend. However, if we return 'true' here, an
399 ICE occurs. Initializing the backend doesn't hurt much,
400 hence, for now we can live with it as is. */
405 /* Set the options for -Wall. */
408 set_Wall (int setting)
410 gfc_option.warn_aliasing = setting;
411 gfc_option.warn_ampersand = setting;
412 gfc_option.warn_conversion = setting;
413 gfc_option.warn_line_truncation = setting;
414 gfc_option.warn_surprising = setting;
415 gfc_option.warn_tabs = !setting;
416 gfc_option.warn_underflow = setting;
417 gfc_option.warn_intrinsic_shadow = setting;
418 gfc_option.warn_intrinsics_std = setting;
419 gfc_option.warn_character_truncation = setting;
421 warn_unused = setting;
422 warn_return_type = setting;
423 warn_switch = setting;
424 warn_uninitialized = setting;
429 gfc_handle_module_path_options (const char *arg)
432 if (gfc_option.module_dir != NULL)
433 gfc_fatal_error ("gfortran: Only one -J option allowed");
435 gfc_option.module_dir = (char *) gfc_getmem (strlen (arg) + 2);
436 strcpy (gfc_option.module_dir, arg);
437 strcat (gfc_option.module_dir, "/");
439 gfc_add_include_path (gfc_option.module_dir, true, false);
444 gfc_handle_fpe_trap_option (const char *arg)
446 int result, pos = 0, n;
447 static const char * const exception[] = { "invalid", "denormal", "zero",
448 "overflow", "underflow",
450 static const int opt_exception[] = { GFC_FPE_INVALID, GFC_FPE_DENORMAL,
451 GFC_FPE_ZERO, GFC_FPE_OVERFLOW,
452 GFC_FPE_UNDERFLOW, GFC_FPE_PRECISION,
460 while (arg[pos] && arg[pos] != ',')
464 for (n = 0; exception[n] != NULL; n++)
466 if (exception[n] && strncmp (exception[n], arg, pos) == 0)
468 gfc_option.fpe |= opt_exception[n];
476 gfc_fatal_error ("Argument to -ffpe-trap is not valid: %s", arg);
482 gfc_handle_coarray_option (const char *arg)
484 if (strcmp (arg, "none") == 0)
485 gfc_option.coarray = GFC_FCOARRAY_NONE;
486 else if (strcmp (arg, "single") == 0)
487 gfc_option.coarray = GFC_FCOARRAY_SINGLE;
489 gfc_fatal_error ("Argument to -fcoarray is not valid: %s", arg);
494 gfc_handle_runtime_check_option (const char *arg)
496 int result, pos = 0, n;
497 static const char * const optname[] = { "all", "bounds", "array-temps",
498 "recursion", "do", "pointer",
500 static const int optmask[] = { GFC_RTCHECK_ALL, GFC_RTCHECK_BOUNDS,
501 GFC_RTCHECK_ARRAY_TEMPS,
502 GFC_RTCHECK_RECURSION, GFC_RTCHECK_DO,
503 GFC_RTCHECK_POINTER, GFC_RTCHECK_MEM,
511 while (arg[pos] && arg[pos] != ',')
515 for (n = 0; optname[n] != NULL; n++)
517 if (optname[n] && strncmp (optname[n], arg, pos) == 0)
519 gfc_option.rtcheck |= optmask[n];
527 gfc_fatal_error ("Argument to -fcheck is not valid: %s", arg);
532 /* Handle command-line options. Returns 0 if unrecognized, 1 if
533 recognized and handled. */
536 gfc_handle_option (size_t scode, const char *arg, int value,
537 int kind ATTRIBUTE_UNUSED)
540 enum opt_code code = (enum opt_code) scode;
542 /* Ignore file names. */
546 if (gfc_cpp_handle_option (scode, arg, value) == 1)
560 gfc_option.warn_aliasing = value;
564 gfc_option.warn_ampersand = value;
567 case OPT_Warray_temporaries:
568 gfc_option.warn_array_temp = value;
571 case OPT_Wcharacter_truncation:
572 gfc_option.warn_character_truncation = value;
575 case OPT_Wconversion:
576 gfc_option.warn_conversion = value;
579 case OPT_Wconversion_extra:
580 gfc_option.warn_conversion_extra = value;
583 case OPT_Wimplicit_interface:
584 gfc_option.warn_implicit_interface = value;
587 case OPT_Wimplicit_procedure:
588 gfc_option.warn_implicit_procedure = value;
591 case OPT_Wline_truncation:
592 gfc_option.warn_line_truncation = value;
595 case OPT_Wreturn_type:
596 warn_return_type = value;
599 case OPT_Wsurprising:
600 gfc_option.warn_surprising = value;
604 gfc_option.warn_tabs = value;
608 gfc_option.warn_underflow = value;
611 case OPT_Wintrinsic_shadow:
612 gfc_option.warn_intrinsic_shadow = value;
615 case OPT_Walign_commons:
616 gfc_option.warn_align_commons = value;
619 case OPT_fall_intrinsics:
620 gfc_option.flag_all_intrinsics = 1;
624 gfc_option.flag_automatic = value;
627 case OPT_fallow_leading_underscore:
628 gfc_option.flag_allow_leading_underscore = value;
632 gfc_option.flag_backslash = value;
636 gfc_option.flag_backtrace = value;
639 case OPT_fcheck_array_temporaries:
640 gfc_option.rtcheck |= GFC_RTCHECK_ARRAY_TEMPS;
644 gfc_option.flag_dump_core = value;
647 case OPT_fcray_pointer:
648 gfc_option.flag_cray_pointer = value;
652 gfc_option.flag_f2c = value;
656 gfc_option.flag_dollar_ok = value;
659 case OPT_fexternal_blas:
660 gfc_option.flag_external_blas = value;
663 case OPT_fblas_matmul_limit_:
664 gfc_option.blas_matmul_limit = value;
667 case OPT_fd_lines_as_code:
668 gfc_option.flag_d_lines = 1;
671 case OPT_fd_lines_as_comments:
672 gfc_option.flag_d_lines = 0;
675 case OPT_fdump_parse_tree:
676 gfc_option.dump_parse_tree = value;
679 case OPT_ffixed_form:
680 gfc_option.source_form = FORM_FIXED;
683 case OPT_ffixed_line_length_none:
684 gfc_option.fixed_line_length = 0;
687 case OPT_ffixed_line_length_:
688 if (value != 0 && value < 7)
689 gfc_fatal_error ("Fixed line length must be at least seven.");
690 gfc_option.fixed_line_length = value;
694 gfc_option.source_form = FORM_FREE;
698 gfc_option.flag_openmp = value;
701 case OPT_ffree_line_length_none:
702 gfc_option.free_line_length = 0;
705 case OPT_ffree_line_length_:
706 if (value != 0 && value < 4)
707 gfc_fatal_error ("Free line length must be at least three.");
708 gfc_option.free_line_length = value;
711 case OPT_funderscoring:
712 gfc_option.flag_underscoring = value;
715 case OPT_fwhole_file:
716 gfc_option.flag_whole_file = 1;
719 case OPT_fsecond_underscore:
720 gfc_option.flag_second_underscore = value;
723 case OPT_static_libgfortran:
724 #ifndef HAVE_LD_STATIC_DYNAMIC
725 gfc_fatal_error ("-static-libgfortran is not supported in this "
730 case OPT_fimplicit_none:
731 gfc_option.flag_implicit_none = value;
734 case OPT_fintrinsic_modules_path:
735 gfc_add_include_path (arg, false, false);
736 gfc_add_intrinsic_modules_path (arg);
739 case OPT_fmax_array_constructor_:
740 gfc_option.flag_max_array_constructor = value > 65535 ? value : 65535;
743 case OPT_fmax_errors_:
744 gfc_option.max_errors = value;
747 case OPT_fmax_stack_var_size_:
748 gfc_option.flag_max_stack_var_size = value;
751 case OPT_fmodule_private:
752 gfc_option.flag_module_private = value;
755 case OPT_frange_check:
756 gfc_option.flag_range_check = value;
759 case OPT_fpack_derived:
760 gfc_option.flag_pack_derived = value;
763 case OPT_frepack_arrays:
764 gfc_option.flag_repack_arrays = value;
767 case OPT_fpreprocessed:
768 gfc_option.flag_preprocessed = value;
771 case OPT_fmax_identifier_length_:
772 if (value > GFC_MAX_SYMBOL_LEN)
773 gfc_fatal_error ("Maximum supported identifier length is %d",
775 gfc_option.max_identifier_length = value;
778 case OPT_fdefault_integer_8:
779 gfc_option.flag_default_integer = value;
782 case OPT_fdefault_real_8:
783 gfc_option.flag_default_real = value;
786 case OPT_fdefault_double_8:
787 gfc_option.flag_default_double = value;
790 case OPT_finit_local_zero:
791 gfc_option.flag_init_integer = GFC_INIT_INTEGER_ON;
792 gfc_option.flag_init_integer_value = 0;
793 gfc_option.flag_init_real = GFC_INIT_REAL_ZERO;
794 gfc_option.flag_init_logical = GFC_INIT_LOGICAL_FALSE;
795 gfc_option.flag_init_character = GFC_INIT_CHARACTER_ON;
796 gfc_option.flag_init_character_value = (char)0;
799 case OPT_finit_logical_:
800 if (!strcasecmp (arg, "false"))
801 gfc_option.flag_init_logical = GFC_INIT_LOGICAL_FALSE;
802 else if (!strcasecmp (arg, "true"))
803 gfc_option.flag_init_logical = GFC_INIT_LOGICAL_TRUE;
805 gfc_fatal_error ("Unrecognized option to -finit-logical: %s",
809 case OPT_finit_real_:
810 if (!strcasecmp (arg, "zero"))
811 gfc_option.flag_init_real = GFC_INIT_REAL_ZERO;
812 else if (!strcasecmp (arg, "nan"))
813 gfc_option.flag_init_real = GFC_INIT_REAL_NAN;
814 else if (!strcasecmp (arg, "snan"))
815 gfc_option.flag_init_real = GFC_INIT_REAL_SNAN;
816 else if (!strcasecmp (arg, "inf"))
817 gfc_option.flag_init_real = GFC_INIT_REAL_INF;
818 else if (!strcasecmp (arg, "-inf"))
819 gfc_option.flag_init_real = GFC_INIT_REAL_NEG_INF;
821 gfc_fatal_error ("Unrecognized option to -finit-real: %s",
825 case OPT_finit_integer_:
826 gfc_option.flag_init_integer = GFC_INIT_INTEGER_ON;
827 gfc_option.flag_init_integer_value = atoi (arg);
830 case OPT_finit_character_:
831 if (value >= 0 && value <= 127)
833 gfc_option.flag_init_character = GFC_INIT_CHARACTER_ON;
834 gfc_option.flag_init_character_value = (char)value;
837 gfc_fatal_error ("The value of n in -finit-character=n must be "
838 "between 0 and 127");
842 gfc_add_include_path (arg, true, false);
846 gfc_handle_module_path_options (arg);
850 gfc_option.flag_sign_zero = value;
854 gfc_handle_fpe_trap_option (arg);
858 gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95 | GFC_STD_F77;
859 gfc_option.warn_std = GFC_STD_F95_OBS;
860 gfc_option.max_continue_fixed = 19;
861 gfc_option.max_continue_free = 39;
862 gfc_option.max_identifier_length = 31;
863 gfc_option.warn_ampersand = 1;
864 gfc_option.warn_tabs = 0;
868 gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77
869 | GFC_STD_F2003 | GFC_STD_F95;
870 gfc_option.warn_std = GFC_STD_F95_OBS;
871 gfc_option.max_identifier_length = 63;
872 gfc_option.warn_ampersand = 1;
873 gfc_option.warn_tabs = 0;
877 gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77
878 | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008;
879 gfc_option.warn_std = GFC_STD_F95_OBS;
880 gfc_option.max_identifier_length = 63;
881 gfc_option.warn_ampersand = 1;
882 gfc_option.warn_tabs = 0;
886 set_default_std_flags ();
890 set_default_std_flags ();
891 gfc_option.warn_std = 0;
894 case OPT_Wintrinsics_std:
895 gfc_option.warn_intrinsics_std = value;
898 case OPT_fshort_enums:
899 flag_short_enums = 1;
902 case OPT_fconvert_little_endian:
903 gfc_option.convert = GFC_CONVERT_LITTLE;
906 case OPT_fconvert_big_endian:
907 gfc_option.convert = GFC_CONVERT_BIG;
910 case OPT_fconvert_native:
911 gfc_option.convert = GFC_CONVERT_NATIVE;
914 case OPT_fconvert_swap:
915 gfc_option.convert = GFC_CONVERT_SWAP;
918 case OPT_frecord_marker_4:
919 gfc_option.record_marker = 4;
922 case OPT_frecord_marker_8:
923 gfc_option.record_marker = 8;
926 case OPT_fmax_subrecord_length_:
927 if (value > MAX_SUBRECORD_LENGTH)
928 gfc_fatal_error ("Maximum subrecord length cannot exceed %d",
929 MAX_SUBRECORD_LENGTH);
931 gfc_option.max_subrecord_length = value;
935 gfc_option.flag_recursive = 1;
938 case OPT_falign_commons:
939 gfc_option.flag_align_commons = value;
942 case OPT_fprotect_parens:
943 gfc_option.flag_protect_parens = value;
947 gfc_handle_runtime_check_option (arg);
951 gfc_handle_coarray_option (arg);