| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <html> |
| <!-- Copyright (C) 1999-2014 Free Software Foundation, Inc. |
| |
| Permission is granted to copy, distribute and/or modify this document |
| under the terms of the GNU Free Documentation License, Version 1.3 or |
| any later version published by the Free Software Foundation; with the |
| Invariant Sections being "Funding Free Software", the Front-Cover |
| Texts being (a) (see below), and with the Back-Cover Texts being (b) |
| (see below). A copy of the license is included in the section entitled |
| "GNU Free Documentation License". |
| |
| (a) The FSF's Front-Cover Text is: |
| |
| A GNU Manual |
| |
| (b) The FSF's Back-Cover Text is: |
| |
| You have freedom to copy and modify this GNU Manual, like GNU |
| software. Copies published by the Free Software Foundation raise |
| funds for GNU development. --> |
| <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ --> |
| <head> |
| <title>The GNU Fortran Compiler: _gfortran_set_options</title> |
| |
| <meta name="description" content="The GNU Fortran Compiler: _gfortran_set_options"> |
| <meta name="keywords" content="The GNU Fortran Compiler: _gfortran_set_options"> |
| <meta name="resource-type" content="document"> |
| <meta name="distribution" content="global"> |
| <meta name="Generator" content="makeinfo"> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <link href="index.html#Top" rel="start" title="Top"> |
| <link href="Option-Index.html#Option-Index" rel="index" title="Option Index"> |
| <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> |
| <link href="Non_002dFortran-Main-Program.html#Non_002dFortran-Main-Program" rel="up" title="Non-Fortran Main Program"> |
| <link href="_005fgfortran_005fset_005fconvert.html#g_t_005fgfortran_005fset_005fconvert" rel="next" title="_gfortran_set_convert"> |
| <link href="_005fgfortran_005fset_005fargs.html#g_t_005fgfortran_005fset_005fargs" rel="prev" title="_gfortran_set_args"> |
| <style type="text/css"> |
| <!-- |
| a.summary-letter {text-decoration: none} |
| blockquote.smallquotation {font-size: smaller} |
| div.display {margin-left: 3.2em} |
| div.example {margin-left: 3.2em} |
| div.indentedblock {margin-left: 3.2em} |
| div.lisp {margin-left: 3.2em} |
| div.smalldisplay {margin-left: 3.2em} |
| div.smallexample {margin-left: 3.2em} |
| div.smallindentedblock {margin-left: 3.2em; font-size: smaller} |
| div.smalllisp {margin-left: 3.2em} |
| kbd {font-style:oblique} |
| pre.display {font-family: inherit} |
| pre.format {font-family: inherit} |
| pre.menu-comment {font-family: serif} |
| pre.menu-preformatted {font-family: serif} |
| pre.smalldisplay {font-family: inherit; font-size: smaller} |
| pre.smallexample {font-size: smaller} |
| pre.smallformat {font-family: inherit; font-size: smaller} |
| pre.smalllisp {font-size: smaller} |
| span.nocodebreak {white-space:nowrap} |
| span.nolinebreak {white-space:nowrap} |
| span.roman {font-family:serif; font-weight:normal} |
| span.sansserif {font-family:sans-serif; font-weight:normal} |
| ul.no-bullet {list-style: none} |
| --> |
| </style> |
| |
| |
| </head> |
| |
| <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> |
| <a name="g_t_005fgfortran_005fset_005foptions"></a> |
| <div class="header"> |
| <p> |
| Next: <a href="_005fgfortran_005fset_005fconvert.html#g_t_005fgfortran_005fset_005fconvert" accesskey="n" rel="next">_gfortran_set_convert</a>, Previous: <a href="_005fgfortran_005fset_005fargs.html#g_t_005fgfortran_005fset_005fargs" accesskey="p" rel="prev">_gfortran_set_args</a>, Up: <a href="Non_002dFortran-Main-Program.html#Non_002dFortran-Main-Program" accesskey="u" rel="up">Non-Fortran Main Program</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p> |
| </div> |
| <hr> |
| <a name="g_t_005fgfortran_005fset_005foptions-_002d_002d_002d-Set-library-option-flags"></a> |
| <h4 class="subsection">7.3.2 <code>_gfortran_set_options</code> — Set library option flags</h4> |
| <a name="index-_005fgfortran_005fset_005foptions"></a> |
| <a name="index-libgfortran-initialization_002c-set_005foptions"></a> |
| |
| <dl compact="compact"> |
| <dt><em>Description</em>:</dt> |
| <dd><p><code>_gfortran_set_options</code> 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 <a href="Code-Gen-Options.html#Code-Gen-Options">Code Gen Options</a>. Please note that not all flags are actually |
| used. |
| </p> |
| </dd> |
| <dt><em>Syntax</em>:</dt> |
| <dd><p><code>void _gfortran_set_options (int num, int options[])</code> |
| </p> |
| </dd> |
| <dt><em>Arguments</em>:</dt> |
| <dd><table> |
| <tr><td width="15%"><var>num</var></td><td width="70%">number of options passed</td></tr> |
| <tr><td width="15%"><var>argv</var></td><td width="70%">The list of flag values</td></tr> |
| </table> |
| |
| </dd> |
| <dt><em>option flag list</em>:</dt> |
| <dd><table> |
| <tr><td width="15%"><var>option</var>[0]</td><td width="70%">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) <code>GFC_STD_F77</code> (1), |
| <code>GFC_STD_F95_OBS</code> (2), <code>GFC_STD_F95_DEL</code> (4), <code>GFC_STD_F95</code> |
| (8), <code>GFC_STD_F2003</code> (16), <code>GFC_STD_GNU</code> (32), |
| <code>GFC_STD_LEGACY</code> (64), <code>GFC_STD_F2008</code> (128), |
| <code>GFC_STD_F2008_OBS</code> (256) and GFC_STD_F2008_TS (512). Default: |
| <code>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</code>.</td></tr> |
| <tr><td width="15%"><var>option</var>[1]</td><td width="70%">Standard-warning flag; prints a warning to |
| standard error. Default: <code>GFC_STD_F95_DEL | GFC_STD_LEGACY</code>.</td></tr> |
| <tr><td width="15%"><var>option</var>[2]</td><td width="70%">If non zero, enable pedantic checking. |
| Default: off.</td></tr> |
| <tr><td width="15%"><var>option</var>[3]</td><td width="70%">Unused.</td></tr> |
| <tr><td width="15%"><var>option</var>[4]</td><td width="70%">If non zero, enable backtracing on run-time |
| errors. Default: off. (Default in the compiler: on.) |
| Note: Installs a signal handler and requires command-line |
| initialization using <code>_gfortran_set_args</code>.</td></tr> |
| <tr><td width="15%"><var>option</var>[5]</td><td width="70%">If non zero, supports signed zeros. |
| Default: enabled.</td></tr> |
| <tr><td width="15%"><var>option</var>[6]</td><td width="70%">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.</td></tr> |
| <tr><td width="15%"><var>option</var>[7]</td><td width="70%">Unused.</td></tr> |
| <tr><td width="15%"><var>option</var>[8]</td><td width="70%">Show a warning when invoking <code>STOP</code> and |
| <code>ERROR STOP</code> if a floating-point exception occurred. Possible values |
| are (bitwise or-ed) <code>GFC_FPE_INVALID</code> (1), <code>GFC_FPE_DENORMAL</code> (2), |
| <code>GFC_FPE_ZERO</code> (4), <code>GFC_FPE_OVERFLOW</code> (8), |
| <code>GFC_FPE_UNDERFLOW</code> (16), <code>GFC_FPE_INEXACT</code> (32). Default: None (0). |
| (Default in the compiler: <code>GFC_FPE_INVALID | GFC_FPE_DENORMAL | |
| GFC_FPE_ZERO | GFC_FPE_OVERFLOW | GFC_FPE_UNDERFLOW</code>.)</td></tr> |
| </table> |
| |
| </dd> |
| <dt><em>Example</em>:</dt> |
| <dd><div class="smallexample"> |
| <pre class="smallexample"> /* Use gfortran 4.9 default options. */ |
| static int options[] = {68, 511, 0, 0, 1, 1, 0, 0, 31}; |
| _gfortran_set_options (9, &options); |
| </pre></div> |
| </dd> |
| </dl> |
| |
| |
| <hr> |
| <div class="header"> |
| <p> |
| Next: <a href="_005fgfortran_005fset_005fconvert.html#g_t_005fgfortran_005fset_005fconvert" accesskey="n" rel="next">_gfortran_set_convert</a>, Previous: <a href="_005fgfortran_005fset_005fargs.html#g_t_005fgfortran_005fset_005fargs" accesskey="p" rel="prev">_gfortran_set_args</a>, Up: <a href="Non_002dFortran-Main-Program.html#Non_002dFortran-Main-Program" accesskey="u" rel="up">Non-Fortran Main Program</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p> |
| </div> |
| |
| |
| |
| </body> |
| </html> |