]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/doc/gfortran/intrinsic-procedures/compileroptions.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / fortran / doc / gfortran / intrinsic-procedures / compileroptions.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. _compiler_options:
7
8 COMPILER_OPTIONS --- Options passed to the compiler
9 ***************************************************
10
11 .. index:: COMPILER_OPTIONS, flags inquiry function, options inquiry function, compiler flags inquiry function
12
13 .. function:: COMPILER_OPTIONS()
14
15 ``COMPILER_OPTIONS`` returns a string with the options used for
16 compiling.
17
18 :return:
19 The return value is a default-kind string with system-dependent length.
20 It contains the compiler flags used to compile the file, which called
21 the ``COMPILER_OPTIONS`` intrinsic.
22
23 Standard:
24 Fortran 2008
25
26 Class:
27 Inquiry function of the module ``ISO_FORTRAN_ENV``
28
29 Syntax:
30 .. code-block:: fortran
31
32 STR = COMPILER_OPTIONS()
33
34 Arguments:
35 None
36
37 Example:
38 .. code-block:: fortran
39
40 use iso_fortran_env
41 print '(4a)', 'This file was compiled by ', &
42 compiler_version(), ' using the options ', &
43 compiler_options()
44 end
45
46 See also:
47 :ref:`COMPILER_VERSION`,
48 :ref:`ISO_FORTRAN_ENV`