_gfortran_set_options - The GNU Fortran Compiler
Description: The GNU Fortran Compiler

Next: _gfortran_set_convert, Previous: _gfortran_set_args, Up: Non-Fortran Main Program

#### 7.3.2 `_gfortran_set_options` — Set library option flags

Description:
  `_gfortran_set_options` sets several flags related to the Fortran standard to be used, whether backtracing should be enabled and whether range checks should be performed. The syntax allows for upward compatibility since the number of passed flags is specified; for non-passed flags, the default value is used. See also see Code Gen Options. Please note that not all flags are actually used.
Syntax:
  `void _gfortran_set_options (int num, int options[])`
Arguments:

  num | number of options passed
  argv | The list of flag values

option flag list:

  option[0] | Allowed standard; can give run-time errors if e.g. an input-output edit descriptor is invalid in a given standard. Possible values are (bitwise or-ed) `GFC_STD_F77` (1), `GFC_STD_F95_OBS` (2), `GFC_STD_F95_DEL` (4), `GFC_STD_F95` (8), `GFC_STD_F2003` (16), `GFC_STD_GNU` (32), `GFC_STD_LEGACY` (64), `GFC_STD_F2008` (128), `GFC_STD_F2008_OBS` (256) and GFC_STD_F2008_TS (512). Default: `GFC_STD_F95_OBS | GFC_STD_F95_DEL | GFC_STD_F95 | GFC_STD_F2003 | GFC_STD_F2008 | GFC_STD_F2008_TS | GFC_STD_F2008_OBS | GFC_STD_F77 | GFC_STD_GNU | GFC_STD_LEGACY`.
  option[1] | Standard-warning flag; prints a warning to standard error. Default: `GFC_STD_F95_DEL | GFC_STD_LEGACY`.
  option[2] | If non zero, enable pedantic checking. Default: off.
  option[3] | Unused.
  option[4] | If non zero, enable backtracing on run-time errors. Default: off. Note: Installs a signal handler and requires command-line initialization using `_gfortran_set_args`.
  option[5] | If non zero, supports signed zeros. Default: enabled.
  option[6] | Enables run-time checking. Possible values are (bitwise or-ed): GFC_RTCHECK_BOUNDS (1), GFC_RTCHECK_ARRAY_TEMPS (2), GFC_RTCHECK_RECURSION (4), GFC_RTCHECK_DO (16), GFC_RTCHECK_POINTER (32). Default: disabled.

Example:

                  /* Use gfortran 4.8 default options.  */
                  static int options[] = {68, 511, 0, 0, 1, 1, 0};
                  _gfortran_set_options (7, &options);