⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 invoke.texi

📁 理解和实践操作系统的一本好书
💻 TEXI
📖 第 1 页 / 共 3 页
字号:
@c Copyright (C) 2004, 2005, 2006, 2007@c Free Software Foundation, Inc.@c This is part of the GNU Fortran manual.   @c For copying conditions, see the file gfortran.texi.@ignore@c man begin COPYRIGHTCopyright @copyright{} 2004, 2005, 2006, 2007Free Software Foundation, Inc.Permission is granted to copy, distribute and/or modify this documentunder the terms of the GNU Free Documentation License, Version 1.2 orany later version published by the Free Software Foundation; with theInvariant Sections being ``GNU General Public License'' and ``FundingFree Software'', the Front-Cover texts being (a) (see below), and withthe Back-Cover Texts being (b) (see below).  A copy of the license isincluded in the gfdl(7) man page. (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.@c man end@c Set file name and title for the man page.@setfilename gfortran@settitle GNU Fortran compiler.@c man begin SYNOPSISgfortran [@option{-c}|@option{-S}|@option{-E}]         [@option{-g}] [@option{-pg}] [@option{-O}@var{level}]         [@option{-W}@var{warn}@dots{}] [@option{-pedantic}]         [@option{-I}@var{dir}@dots{}] [@option{-L}@var{dir}@dots{}]         [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}]         [@option{-f}@var{option}@dots{}]	 [@option{-m}@var{machine-option}@dots{}]         [@option{-o} @var{outfile}] @var{infile}@dots{}Only the most useful options are listed here; see below for theremainder.@c man end@c man begin SEEALSOgpl(7), gfdl(7), fsf-funding(7),cpp(1), gcov(1), gcc(1), as(1), ld(1), gdb(1), adb(1), dbx(1), sdb(1)and the Info entries for @file{gcc}, @file{cpp}, @file{gfortran}, @file{as},@file{ld}, @file{binutils} and @file{gdb}.@c man end@c man begin BUGSFor instructions on reporting bugs, see@w{@value{BUGURL}}.@c man end@c man begin AUTHORSee the Info entry for @command{gfortran} for contributors to GCC andGNU Fortran.@c man end@end ignore@node Invoking GNU Fortran@chapter GNU Fortran Command Options@cindex GNU Fortran command options@cindex command options@cindex options, @command{gfortran} command@c man begin DESCRIPTIONThe @command{gfortran} command supports all the options supported by the@command{gcc} command.  Only options specific to GNU Fortran are documented here.@xref{Invoking GCC,,GCC Command Options,gcc,Using the GNU CompilerCollection (GCC)}, for informationon the non-Fortran-specific aspects of the @command{gcc} command (and,therefore, the @command{gfortran} command).@cindex options, negative formsAll GCC and GNU Fortran optionsare accepted both by @command{gfortran} and by @command{gcc}(as well as any other drivers built at the same time,such as @command{g++}),since adding GNU Fortran to the GCC distributionenables acceptance of GNU Fortran optionsby all of the relevant drivers.In some cases, options have positive and negative forms;the negative form of @option{-ffoo} would be @option{-fno-foo}.This manual documents only one of these two forms, whicheverone is not the default.@c man end@menu* Option Summary::      Brief list of all @command{gfortran} options,                        without explanations.* Fortran Dialect Options::  Controlling the variant of Fortran language                             compiled.* Error and Warning Options::     How picky should the compiler be?* Debugging Options::   Symbol tables, measurements, and debugging dumps.* Directory Options::   Where to find module files* Link Options ::       Influencing the linking step* Runtime Options::     Influencing runtime behavior* Code Gen Options::    Specifying conventions for function calls, data layout                        and register usage.* Environment Variables:: Environment variables that affect @command{gfortran}.@end menu@node Option Summary@section Option summary@c man begin OPTIONSHere is a summary of all the options specific to GNU Fortran, groupedby type.  Explanations are in the following sections.@table @emph@item Fortran Language Options@xref{Fortran Dialect Options,,Options controlling Fortran dialect}.@gccoptlist{-fall-intrinsics  -ffree-form  -fno-fixed-form @gol-fdollar-ok  -fimplicit-none  -fmax-identifier-length @gol-std=@var{std} -fd-lines-as-code  -fd-lines-as-comments @gol-ffixed-line-length-@var{n}  -ffixed-line-length-none @gol-ffree-line-length-@var{n}  -ffree-line-length-none @gol-fdefault-double-8  -fdefault-integer-8  -fdefault-real-8 @gol-fcray-pointer  -fopenmp  -fno-range-check -fbackslash -fmodule-private}@item Error and Warning Options@xref{Error and Warning Options,,Options to request or suppress errorsand warnings}.@gccoptlist{-fmax-errors=@var{n} @gol-fsyntax-only  -pedantic  -pedantic-errors @gol-Wall  -Waliasing  -Wampersand  -Wcharacter-truncation  -Wconversion @gol-Wimplicit-interface  -Wline-truncation  -Wnonstd-intrinsics  -Wsurprising @gol-Wno-tabs  -Wunderflow -Wunused-parameter}@item Debugging Options@xref{Debugging Options,,Options for debugging your program or GNU Fortran}.@gccoptlist{-fdump-parse-tree  -ffpe-trap=@var{list} @gol-fdump-core -fbacktrace}@item Directory Options@xref{Directory Options,,Options for directory search}.@gccoptlist{-I@var{dir}  -J@var{dir}  -M@var{dir}  -fintrinsic-modules-path @var{dir}}@item Link Options@xref{Link Options,,Options for influencing the linking step}.@gccoptlist{-static-libgfortran}@item Runtime Options@xref{Runtime Options,,Options for influencing runtime behavior}.@gccoptlist{-fconvert=@var{conversion}  -frecord-marker=@var{length} @gol-fmax-subrecord-length=@var{length}  -fsign-zero}@item Code Generation Options@xref{Code Gen Options,,Options for code generation conventions}.@gccoptlist{-fno-automatic  -ff2c  -fno-underscoring-fsecond-underscore @gol-fbounds-check  -fmax-stack-var-size=@var{n} @gol-fpack-derived  -frepack-arrays  -fshort-enums  -fexternal-blas @gol-fblas-matmul-limit=@var{n} -frecursive -finit-local-zero @gol-finit-integer=@var{n} -finit-real=@var{<zero|inf|-inf|nan>} @gol-finit-logical=@var{<true|false>} -finit-character=@var{n}}@end table@menu* Fortran Dialect Options::  Controlling the variant of Fortran language                             compiled.* Error and Warning Options::     How picky should the compiler be?* Debugging Options::   Symbol tables, measurements, and debugging dumps.* Directory Options::   Where to find module files* Link Options ::       Influencing the linking step* Runtime Options::     Influencing runtime behavior* Code Gen Options::    Specifying conventions for function calls, data layout                        and register usage.@end menu@node Fortran Dialect Options@section Options controlling Fortran dialect@cindex dialect options@cindex language, dialect options@cindex options, dialectThe following options control the details of the Fortran dialectaccepted by the compiler:@table @gcctabopt@item -ffree-form@item -ffixed-form@opindex @code{ffree-form}@opindex @code{fno-fixed-form}@cindex options, fortran dialect@cindex file format, free@cindex file format, fixedSpecify the layout used by the source file.  The free form layoutwas introduced in Fortran 90.  Fixed form was traditionally used inolder Fortran programs.  When neither option is specified, the sourceform is determined by the file extension.@item -fall-intrinsics@opindex @code{fall-intrinsics}Accept all of the intrinsic procedures provided in libgfortran without regard to the setting of @option{-std}.  In particular, this option can be quite useful with @option{-std=f95}.  Additionally,@command{gfortran} will ignore @option{-Wnonstd-intrinsics}.@item -fd-lines-as-code@item -fd-lines-as-comments@opindex @code{fd-lines-as-code}@opindex @code{fd-lines-as-comments}Enable special treatment for lines beginning with @code{d} or @code{D}in fixed form sources.  If the @option{-fd-lines-as-code} option isgiven they are treated as if the first column contained a blank.  If the@option{-fd-lines-as-comments} option is given, they are treated ascomment lines.@item -fdefault-double-8@opindex @code{fdefault-double-8}Set the @code{DOUBLE PRECISION} type to an 8 byte wide type.@item -fdefault-integer-8@opindex @code{fdefault-integer-8}Set the default integer and logical types to an 8 byte wide type.Do nothing if this is already the default.@item -fdefault-real-8@opindex @code{fdefault-real-8}Set the default real type to an 8 byte wide type.Do nothing if this is already the default.@item -fdollar-ok@opindex @code{fdollar-ok}@cindex $@cindex symbol names@cindex character setAllow @samp{$} as a valid character in a symbol name.@item -fbackslash@opindex @code{backslash}@cindex backslash@cindex escape charactersChange the interpretation of backslashes in string literalsfrom a single backslash character to ``C-style'' escape characters.The following combinations are expanded \a, \b, \f, \n, \r, \t,\v, \\, and \0 to the ASCII characters alert, backspace, form feed,newline, carriage return, horizontal tab, vertical tab, backslash,and NUL, respectively.  All other combinations of a character precededby \ are unexpanded.@item -fmodule-private@opindex @code{fmodule-private}@cindex module entities@cindex privateSet the default accessibility of module entities to @code{PRIVATE}.Use-associated entities will not be accessible unless they are explicitlydeclared as @code{PUBLIC}.@item -ffixed-line-length-@var{n}@opindex @code{ffixed-line-length-}@var{n}@cindex file format, fixedSet column after which characters are ignored in typical fixed-formlines in the source file, and through which spaces are assumed (asif padded to that length) after the ends of short fixed-form lines.Popular values for @var{n} include 72 (thestandard and the default), 80 (card image), and 132 (correspondingto ``extended-source'' options in some popular compilers).@var{n} may also be @samp{none}, meaning that the entire line is meaningfuland that continued character constants never have implicit spaces appendedto them to fill out the line.@option{-ffixed-line-length-0} means the same thing as@option{-ffixed-line-length-none}.@item -ffree-line-length-@var{n}@opindex @code{ffree-line-length-}@var{n}@cindex file format, freeSet column after which characters are ignored in typical free-formlines in the source file. The default value is 132.@var{n} may be @samp{none}, meaning that the entire line is meaningful.@option{-ffree-line-length-0} means the same thing as@option{-ffree-line-length-none}.@item -fmax-identifier-length=@var{n}@opindex @code{fmax-identifier-length=}@var{n}Specify the maximum allowed identifier length. Typical values are31 (Fortran 95) and 63 (Fortran 2003).@item -fimplicit-none@opindex @code{fimplicit-none}Specify that no implicit typing is allowed, unless overridden by explicit@code{IMPLICIT} statements.  This is the equivalent of adding@code{implicit none} to the start of every procedure.@item -fcray-pointer@opindex @code{fcray-pointer}Enable the Cray pointer extension, which provides C-like pointerfunctionality.@item -fopenmp@opindex @code{fopenmp}@cindex OpenMPEnable the OpenMP extensions.  This includes OpenMP @code{!$omp} directivesin free formand @code{c$omp}, @code{*$omp} and @code{!$omp} directives in fixed form,@code{!$} conditional compilation sentinels in free formand @code{c$}, @code{*$} and @code{!$} sentinels in fixed form, and when linking arranges for the OpenMP runtime library to be linkedin.  The option @option{-fopenmp} implies @option{-frecursive}.@item -fno-range-check@opindex @code{frange-check}Disable range checking on results of simplification of constantexpressions during compilation.  For example, GNU Fortran will givean error at compile time when simplifying @code{a = 1. / 0}.With this option, no error will be given and @code{a} will be assignedthe value @code{+Infinity}.  If an expression evaluates to a valueoutside of the relevant range of [@code{-HUGE()}:@code{HUGE()}],then the expression will be replaced by @code{-Inf} or @code{+Inf}as appropriate.Similarly, @code{DATA i/Z'FFFFFFFF'/} will result in an integer overflowon most systems, but with @option{-fno-range-check} the value will``wrap around'' and @code{i} will be initialized to @math{-1} instead.@item -std=@var{std}@opindex @code{std=}@var{std} optionSpecify the standard to which the program is expected to conform, whichmay be one of @samp{f95}, @samp{f2003}, @samp{gnu}, or @samp{legacy}.The default value for @var{std} is @samp{gnu}, which specifies asuperset of the Fortran 95 standard that includes all of the extensionssupported by GNU Fortran, although warnings will be given for obsoleteextensions not recommended for use in new code.  The @samp{legacy} valueis equivalent but without the warnings for obsolete extensions, and maybe useful for old non-standard programs.  The @samp{f95} and@samp{f2003} values specify strict conformance to the Fortran 95 andFortran 2003 standards, respectively; errors are given for allextensions beyond the relevant language standard, and warnings are givenfor the Fortran 77 features that are permitted but obsolescent in laterstandards.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -