-@c Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+@c Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
@c Free Software Foundation, Inc.
@c This is part of the G77 manual.
@c For copying conditions, see the file g77.texi.
@ignore
@c man begin COPYRIGHT
-Copyright @copyright{} 1996, 1997, 1998, 1999, 2000, 2001
+Copyright @copyright{} 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
@setfilename g77
@settitle GNU project Fortran 77 compiler.
@c man begin SYNOPSIS
-g77 [@option{-c}|@option{-S}|@option{-E}] [@option{-std=}@var{standard}]
+g77 [@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{}]
script to report bugs is recommended.
@c man end
@c man begin AUTHOR
-See the Info entry for @file{g77}, or
-@w{@uref{http://gcc.gnu.org/thanks.html}}, for contributors to G77@.
+See the Info entry for @command{g77} for contributors to GCC and G77@.
@c man end
@end ignore
@c man begin DESCRIPTION
-The @code{g77} command supports all the options supported by the
-@code{gcc} command.
-@xref{Invoking GCC,,GNU CC Command Options,gcc,Using and Porting GNU CC},
-for information
-on the non-Fortran-specific aspects of the @code{gcc} command (and,
-therefore, the @code{g77} command).
+The @command{g77} command supports all the options supported by the
+@command{gcc} command.
+@xref{Invoking GCC,,GCC Command Options,gcc,Using the GNU Compiler
+Collection (GCC)}, for information
+on the non-Fortran-specific aspects of the @command{gcc} command (and,
+therefore, the @command{g77} command).
@cindex options, negative forms
@cindex negative forms of options
-All @code{gcc} and @code{g77} options
-are accepted both by @code{g77} and by @code{gcc}
+All @command{gcc} and @command{g77} options
+are accepted both by @command{g77} and by @command{gcc}
(as well as any other drivers built at the same time,
-such as @code{g++}),
-since adding @code{g77} to the @code{gcc} distribution
-enables acceptance of @code{g77}-specific options
+such as @command{g++}),
+since adding @command{g77} to the @command{gcc} distribution
+enables acceptance of @command{g77} options
by all of the relevant drivers.
In some cases, options have positive and negative forms;
-the negative form of @samp{-ffoo} would be @samp{-fno-foo}.
+the negative form of @option{-ffoo} would be @option{-fno-foo}.
This manual documents only one of these two forms, whichever
one is not the default.
@c man end
@menu
-* Option Summary:: Brief list of all @code{g77} options,
+* Option Summary:: Brief list of all @command{g77} options,
without explanations.
* Overall Options:: Controlling the kind of output:
an executable, object files, assembler files,
@table @emph
@item Overall Options
@xref{Overall Options,,Options Controlling the Kind of Output}.
-@smallexample
--fversion -fset-g77-defaults -fno-silent
-@end smallexample
+@gccoptlist{
+-fversion -fset-g77-defaults -fno-silent}
@item Shorthand Options
@xref{Shorthand Options}.
-@smallexample
--ff66 -fno-f66 -ff77 -fno-f77 -fno-ugly
-@end smallexample
+@gccoptlist{
+-ff66 -fno-f66 -ff77 -fno-f77 -fno-ugly}
@item Fortran Language Options
@xref{Fortran Dialect Options,,Options Controlling Fortran Dialect}.
-@smallexample
--ffree-form -fno-fixed-form -ff90
--fvxt -fdollar-ok -fno-backslash
--fno-ugly-args -fno-ugly-assign -fno-ugly-assumed
--fugly-comma -fugly-complex -fugly-init -fugly-logint
--fonetrip -ftypeless-boz
--fintrin-case-initcap -fintrin-case-upper
--fintrin-case-lower -fintrin-case-any
--fmatch-case-initcap -fmatch-case-upper
--fmatch-case-lower -fmatch-case-any
--fsource-case-upper -fsource-case-lower
--fsource-case-preserve
--fsymbol-case-initcap -fsymbol-case-upper
--fsymbol-case-lower -fsymbol-case-any
--fcase-strict-upper -fcase-strict-lower
--fcase-initcap -fcase-upper -fcase-lower -fcase-preserve
--ff2c-intrinsics-delete -ff2c-intrinsics-hide
--ff2c-intrinsics-disable -ff2c-intrinsics-enable
--fbadu77-intrinsics-delete -fbadu77-intrinsics-hide
--fbadu77-intrinsics-disable -fbadu77-intrinsics-enable
--ff90-intrinsics-delete -ff90-intrinsics-hide
--ff90-intrinsics-disable -ff90-intrinsics-enable
--fgnu-intrinsics-delete -fgnu-intrinsics-hide
--fgnu-intrinsics-disable -fgnu-intrinsics-enable
--fmil-intrinsics-delete -fmil-intrinsics-hide
--fmil-intrinsics-disable -fmil-intrinsics-enable
--funix-intrinsics-delete -funix-intrinsics-hide
--funix-intrinsics-disable -funix-intrinsics-enable
--fvxt-intrinsics-delete -fvxt-intrinsics-hide
--fvxt-intrinsics-disable -fvxt-intrinsics-enable
--ffixed-line-length-@var{n} -ffixed-line-length-none
-@end smallexample
+@gccoptlist{
+-ffree-form -fno-fixed-form -ff90 @gol
+-fvxt -fdollar-ok -fno-backslash @gol
+-fno-ugly-args -fno-ugly-assign -fno-ugly-assumed @gol
+-fugly-comma -fugly-complex -fugly-init -fugly-logint @gol
+-fonetrip -ftypeless-boz @gol
+-fintrin-case-initcap -fintrin-case-upper @gol
+-fintrin-case-lower -fintrin-case-any @gol
+-fmatch-case-initcap -fmatch-case-upper @gol
+-fmatch-case-lower -fmatch-case-any @gol
+-fsource-case-upper -fsource-case-lower @gol
+-fsource-case-preserve @gol
+-fsymbol-case-initcap -fsymbol-case-upper @gol
+-fsymbol-case-lower -fsymbol-case-any @gol
+-fcase-strict-upper -fcase-strict-lower @gol
+-fcase-initcap -fcase-upper -fcase-lower -fcase-preserve @gol
+-ff2c-intrinsics-delete -ff2c-intrinsics-hide @gol
+-ff2c-intrinsics-disable -ff2c-intrinsics-enable @gol
+-fbadu77-intrinsics-delete -fbadu77-intrinsics-hide @gol
+-fbadu77-intrinsics-disable -fbadu77-intrinsics-enable @gol
+-ff90-intrinsics-delete -ff90-intrinsics-hide @gol
+-ff90-intrinsics-disable -ff90-intrinsics-enable @gol
+-fgnu-intrinsics-delete -fgnu-intrinsics-hide @gol
+-fgnu-intrinsics-disable -fgnu-intrinsics-enable @gol
+-fmil-intrinsics-delete -fmil-intrinsics-hide @gol
+-fmil-intrinsics-disable -fmil-intrinsics-enable @gol
+-funix-intrinsics-delete -funix-intrinsics-hide @gol
+-funix-intrinsics-disable -funix-intrinsics-enable @gol
+-fvxt-intrinsics-delete -fvxt-intrinsics-hide @gol
+-fvxt-intrinsics-disable -fvxt-intrinsics-enable @gol
+-ffixed-line-length-@var{n} -ffixed-line-length-none}
@item Warning Options
@xref{Warning Options,,Options to Request or Suppress Warnings}.
-@smallexample
--fsyntax-only -pedantic -pedantic-errors -fpedantic
--w -Wno-globals -Wimplicit -Wunused -Wuninitialized
--Wall -Wsurprising
--Werror -W
-@end smallexample
+@gccoptlist{
+-fsyntax-only -pedantic -pedantic-errors -fpedantic @gol
+-w -Wno-globals -Wimplicit -Wunused -Wuninitialized @gol
+-Wall -Wsurprising @gol
+-Werror -W}
@item Debugging Options
@xref{Debugging Options,,Options for Debugging Your Program or GCC}.
-@smallexample
--g
-@end smallexample
+@gccoptlist{
+-g}
@item Optimization Options
@xref{Optimize Options,,Options that Control Optimization}.
-@smallexample
--malign-double
--ffloat-store -fforce-mem -fforce-addr -fno-inline
--ffast-math -fstrength-reduce -frerun-cse-after-loop
--funsafe-math-optimizations -fno-trapping-math
--fexpensive-optimizations -fdelayed-branch
--fschedule-insns -fschedule-insn2 -fcaller-saves
--funroll-loops -funroll-all-loops
--fno-move-all-movables -fno-reduce-all-givs
--fno-rerun-loop-opt
-@end smallexample
+@gccoptlist{
+-malign-double @gol
+-ffloat-store -fforce-mem -fforce-addr -fno-inline @gol
+-ffast-math -fstrength-reduce -frerun-cse-after-loop @gol
+-funsafe-math-optimizations -fno-trapping-math @gol
+-fexpensive-optimizations -fdelayed-branch @gol
+-fschedule-insns -fschedule-insn2 -fcaller-saves @gol
+-funroll-loops -funroll-all-loops @gol
+-fno-move-all-movables -fno-reduce-all-givs @gol
+-fno-rerun-loop-opt}
@item Directory Options
@xref{Directory Options,,Options for Directory Search}.
-@smallexample
--I@var{dir} -I-
-@end smallexample
+@gccoptlist{
+-I@var{dir} -I-}
@item Code Generation Options
@xref{Code Gen Options,,Options for Code Generation Conventions}.
-@smallexample
--fno-automatic -finit-local-zero -fno-f2c
--ff2c-library -fno-underscoring -fno-ident
--fpcc-struct-return -freg-struct-return
--fshort-double -fno-common -fpack-struct
--fzeros -fno-second-underscore
--femulate-complex
--falias-check -fargument-alias
--fargument-noalias -fno-argument-noalias-global
--fno-globals -fflatten-arrays
--fbounds-check -ffortran-bounds-check
-@end smallexample
+@gccoptlist{
+-fno-automatic -finit-local-zero -fno-f2c @gol
+-ff2c-library -fno-underscoring -fno-ident @gol
+-fpcc-struct-return -freg-struct-return @gol
+-fshort-double -fno-common -fpack-struct @gol
+-fzeros -fno-second-underscore @gol
+-femulate-complex @gol
+-falias-check -fargument-alias @gol
+-fargument-noalias -fno-argument-noalias-global @gol
+-fno-globals -fflatten-arrays @gol
+-fbounds-check -ffortran-bounds-check}
@end table
@c man end
program is contained in the file---that is, the language in which the
program is written is generally indicated by the suffix.
Suffixes specific to GNU Fortran are listed below.
-@xref{Overall Options,,gcc,Using and Porting GNU CC}, for
+@xref{Overall Options,,Options Controlling the Kind of
+Output,gcc,Using the GNU Compiler Collection (GCC)}, for
information on suffixes recognized by GNU CC.
-@table @code
+@table @gcctabopt
@cindex .f filename suffix
@cindex .for filename suffix
@cindex .FOR filename suffix
Such source code cannot contain any preprocessor directives, such
as @code{#include}, @code{#define}, @code{#if}, and so on.
-You can force @samp{.f} files to be preprocessed by @code{cpp} by using
-@samp{-x f77-cpp-input}.
+You can force @samp{.f} files to be preprocessed by @command{cpp} by using
+@option{-x f77-cpp-input}.
@xref{LEX}.
@cindex preprocessor
@item @var{file}.fpp
@item @var{file}.FPP
Fortran source code that must be preprocessed (by the C preprocessor
-@code{cpp}, which is part of GNU CC).
+@command{cpp}, which is part of GNU CC).
Note that preprocessing is not extended to the contents of
files included by the @code{INCLUDE} directive---the @code{#include}
preprocessor directive must be used instead.
@cindex Ratfor preprocessor
-@cindex programs, @code{ratfor}
+@cindex programs, @command{ratfor}
@cindex @samp{.r} filename suffix
-@cindex @code{ratfor}
+@cindex @command{ratfor}
@item @var{file}.r
-Ratfor source code, which must be preprocessed by the @code{ratfor}
+Ratfor source code, which must be preprocessed by the @command{ratfor}
command, which is available separately (as it is not yet part of the GNU
Fortran distribution).
-One version in Fortran, adapted for use with @code{g77}, is at
+One version in Fortran, adapted for use with @command{g77} is at
@uref{ftp://members.aol.com/n8tm/rat7.uue} (of uncertain copyright
status). Another, public domain version in C is at
@uref{http://sepwww.stanford.edu/sep/prof/ratfor.shar.2}.
@cindex #define
@cindex #include
@cindex #if
-Use of the preprocessor @code{cpp} allows use of C-like
+Use of the preprocessor @command{cpp} allows use of C-like
constructs such as @code{#define} and @code{#include}, but can
lead to unexpected, even mistaken, results due to Fortran's source file
format.
line being effectively commented out---unfortunate if that
line is a non-comment line of important code!
-@emph{Note:} The @samp{-traditional} and @samp{-undef} flags are supplied
-to @code{cpp} by default, to help avoid unpleasant surprises.
+@emph{Note:} The @option{-traditional} and @option{-undef} flags are supplied
+to @command{cpp} by default, to help avoid unpleasant surprises.
@xref{Preprocessor Options,,Options Controlling the Preprocessor,
-gcc,Using and Porting GNU CC}.
+gcc,Using the GNU Compiler Collection (GCC)}.
This means that ANSI C preprocessor features (such as the @samp{#}
operator) aren't available, and only variables in the C reserved
namespace (generally, names with a leading underscore) are liable to
substitution by C predefines.
Thus, if you want to do system-specific
tests, use, for example, @samp{#ifdef __linux__} rather than @samp{#ifdef linux}.
-Use the @samp{-v} option to see exactly how the preprocessor is invoked.
+Use the @option{-v} option to see exactly how the preprocessor is invoked.
@cindex /*
-Unfortunately, the @samp{-traditional} flag will not avoid an error from
-anything that @code{cpp} sees as an unterminated C comment, such as:
+Unfortunately, the @option{-traditional} flag will not avoid an error from
+anything that @command{cpp} sees as an unterminated C comment, such as:
@smallexample
C Some Fortran compilers accept /* as starting
C an inline comment.
@xref{Trailing Comment}.
The following options that affect overall processing are recognized
-by the @code{g77} and @code{gcc} commands in a GNU Fortran installation:
+by the @command{g77} and @command{gcc} commands in a GNU Fortran installation:
-@table @code
+@table @gcctabopt
@cindex -fversion option
@cindex options, -fversion
@cindex printing version information
@cindex internal consistency checks
@cindex checks, of internal consistency
@item -fversion
-Ensure that the @code{g77}-specific version of the compiler phase is reported,
+Ensure that the @command{g77} version of the compiler phase is reported,
if run,
and, starting in @code{egcs} version 1.1,
that internal consistency checks in the @file{f771} program are run.
-This option is supplied automatically when @samp{-v} or @samp{--verbose}
-is specified as a command-line option for @code{g77} or @code{gcc}
+This option is supplied automatically when @option{-v} or @option{--verbose}
+is specified as a command-line option for @command{g77} or @command{gcc}
and when the resulting commands compile Fortran source files.
+In GCC 3.1, this is changed back to the behaviour @command{gcc} displays
+for @samp{.c} files.
+
@cindex -fset-g77-defaults option
@cindex options, -fset-g77-defaults
@item -fset-g77-defaults
@cindex consistency checks
@cindex internal consistency checks
@cindex checks, of internal consistency
-Set up whatever @code{gcc} options are to apply to Fortran
+Set up whatever @command{gcc} options are to apply to Fortran
compilations, and avoid running internal consistency checks
that might take some time.
This option is supplied automatically when compiling Fortran code
-via the @code{g77} or @code{gcc} command.
+via the @command{g77} or @command{gcc} command.
The description of this option is provided so that users seeing
it in the output of, say, @samp{g77 -v} understand why it is
there.
-@cindex modifying g77
-@cindex code, modifying
+@cindex modifying @command{g77}
+@cindex @command{g77}, modifying
Also, developers who run @code{f771} directly might want to specify it
by hand to get the same defaults as they would running @code{f771}
-via @code{g77} or @code{gcc}.
+via @command{g77} or @command{gcc}
However, such developers should, after linking a new @code{f771}
executable, invoke it without this option once,
e.g. via @kbd{./f771 -quiet < /dev/null},
to ensure that they have not introduced any
internal inconsistencies (such as in the table of
-intrinsics) before proceeding---@code{g77} will crash
+intrinsics) before proceeding---@command{g77} will crash
with a diagnostic if it detects an inconsistency.
@cindex -fno-silent option
@item -fno-silent
Print (to @code{stderr}) the names of the program units as
they are compiled, in a form similar to that used by popular
-UNIX @code{f77} implementations and @code{f2c}.
+UNIX @command{f77} implementations and @command{f2c}
@end table
@xref{Overall Options,,Options Controlling the Kind of Output,
-gcc,Using and Porting GNU CC}, for information
-on more options that control the overall operation of the @code{gcc} command
-(and, by extension, the @code{g77} command).
+gcc,Using the GNU Compiler Collection (GCC)}, for information
+on more options that control the overall operation of the @command{gcc} command
+(and, by extension, the @command{g77} command).
@node Shorthand Options
@section Shorthand Options
The following options serve as ``shorthand''
for other options accepted by the compiler:
-@table @code
+@table @gcctabopt
@cindex -fugly option
@cindex options, -fugly
@item -fugly
Specify that the program is written in idiomatic FORTRAN 66.
Same as @samp{-fonetrip -fugly-assumed}.
-The @samp{-fno-f66} option is the inverse of @samp{-ff66}.
+The @option{-fno-f66} option is the inverse of @option{-ff66}.
As such, it is the same as @samp{-fno-onetrip -fno-ugly-assumed}.
The meaning of this option is likely to be refined as future
-versions of @code{g77} provide more compatibility with other
+versions of @command{g77} provide more compatibility with other
existing and obsolete Fortran implementations.
@cindex -ff77 option
@cindex f77 compatibility
@cindex compatibility, f77
Specify that the program is written in idiomatic UNIX FORTRAN 77
-and/or the dialect accepted by the @code{f2c} product.
+and/or the dialect accepted by the @command{f2c} product.
Same as @samp{-fbackslash -fno-typeless-boz}.
The meaning of this option is likely to be refined as future
-versions of @code{g77} provide more compatibility with other
+versions of @command{g77} provide more compatibility with other
existing and obsolete Fortran implementations.
@cindex -fno-f77 option
@cindex options, -fno-f77
@item -fno-f77
@cindex UNIX f77
-The @samp{-fno-f77} option is @emph{not} the inverse
-of @samp{-ff77}.
+The @option{-fno-f77} option is @emph{not} the inverse
+of @option{-ff77}.
It specifies that the program is not written in idiomatic UNIX
-FORTRAN 77 or @code{f2c}, but in a more widely portable dialect.
-@samp{-fno-f77} is the same as @samp{-fno-backslash}.
+FORTRAN 77 or @command{f2c} but in a more widely portable dialect.
+@option{-fno-f77} is the same as @option{-fno-backslash}.
The meaning of this option is likely to be refined as future
-versions of @code{g77} provide more compatibility with other
+versions of @command{g77} provide more compatibility with other
existing and obsolete Fortran implementations.
@end table
The following options control the dialect of Fortran
that the compiler accepts:
-@table @code
+@table @gcctabopt
@cindex -ffree-form option
@cindex options, -ffree-form
@cindex -fno-fixed-form option
Fortran 90 constructs are recognized.
(Other Fortran 90 constructs
might or might not be recognized depending on other options such as
-@samp{-fvxt}, @samp{-ff90-intrinsics-enable}, and the
+@option{-fvxt}, @option{-ff90-intrinsics-enable}, and the
current level of support for Fortran 90.)
@xref{Fortran 90}, for more information.
GNU Fortran (based on FORTRAN 77 and akin to Fortran 90)
or VXT Fortran (more like VAX FORTRAN).
-The default is @samp{-fno-vxt}.
-@samp{-fvxt} specifies that the VXT Fortran interpretations
+The default is @option{-fno-vxt}.
+@option{-fvxt} specifies that the VXT Fortran interpretations
for those constructs are to be chosen.
@xref{VXT Fortran}, for more information.
Specify that @samp{\} is not to be specially interpreted in character
and Hollerith constants a la C and many UNIX Fortran compilers.
-For example, with @samp{-fbackslash} in effect, @samp{A\nB} specifies
+For example, with @option{-fbackslash} in effect, @samp{A\nB} specifies
three characters, with the second one being newline.
-With @samp{-fno-backslash}, it specifies four characters,
+With @option{-fno-backslash}, it specifies four characters,
@samp{A}, @samp{\}, @samp{n}, and @samp{B}.
-Note that @code{g77} implements a fairly general form of backslash
+Note that @command{g77} implements a fairly general form of backslash
processing that is incompatible with the narrower forms supported
by some other compilers.
-For example, @samp{'A\003B'} is a three-character string in @code{g77},
+For example, @samp{'A\003B'} is a three-character string in @command{g77}
whereas other compilers that support backslash might not support
the three-octal-digit form, and thus treat that string as longer
than three characters.
@xref{Backslash in Constants}, for
-information on why @samp{-fbackslash} is the default
-instead of @samp{-fno-backslash}.
+information on why @option{-fbackslash} is the default
+instead of @option{-fno-backslash}.
@cindex -fno-ugly-args option
@cindex options, -fno-ugly-args
For example, @samp{CALL FOO(,)} is treated as
@samp{CALL FOO(%VAL(0), %VAL(0))}.
That is, @emph{two} null arguments are specified
-by the procedure call when @samp{-fugly-comma} is in force.
+by the procedure call when @option{-fugly-comma} is in force.
And @samp{F = FUNC()} is treated as @samp{F = FUNC(%VAL(0))}.
-The default behavior, @samp{-fno-ugly-comma}, is to ignore
+The default behavior, @option{-fno-ugly-comma}, is to ignore
a single trailing comma in an argument list.
So, by default, @samp{CALL FOO(X,)} is treated
exactly the same as @samp{CALL FOO(X)}.
this is used to permit @code{COMPLEX(KIND=2)}
(@code{DOUBLE COMPLEX}) operands.
-The @samp{-ff90} option controls the interpretation
+The @option{-ff90} option controls the interpretation
of this construct.
@xref{Ugly Complex Part Extraction}, for more information.
initialize numeric types and vice versa.
For example, @samp{DATA I/'F'/, CHRVAR/65/, J/4HABCD/} is disallowed by
-@samp{-fno-ugly-init}.
+@option{-fno-ugly-init}.
@xref{Ugly Conversion of Initializers}, for more information.
expects this behavior from its @code{DO} loops, although that
standard did not specify this behavior.
-The @samp{-fonetrip} option specifies that the source file(s) being
+The @option{-fonetrip} option specifies that the source file(s) being
compiled require one-trip loops.
This option affects only those loops specified by the (iterative) @code{DO}
@cindex options, -fintrin-case-any
@item -fintrin-case-any
Specify expected case for intrinsic names.
-@samp{-fintrin-case-lower} is the default.
+@option{-fintrin-case-lower} is the default.
@cindex -fmatch-case-initcap option
@cindex options, -fmatch-case-initcap
@cindex options, -fmatch-case-any
@item -fmatch-case-any
Specify expected case for keywords.
-@samp{-fmatch-case-lower} is the default.
+@option{-fmatch-case-lower} is the default.
@cindex -fsource-case-upper option
@cindex options, -fsource-case-upper
@item -fsource-case-preserve
Specify whether source text other than character and Hollerith constants
is to be translated to uppercase, to lowercase, or preserved as is.
-@samp{-fsource-case-lower} is the default.
+@option{-fsource-case-lower} is the default.
@cindex -fsymbol-case-initcap option
@cindex options, -fsymbol-case-initcap
@cindex options, -fsymbol-case-any
@item -fsymbol-case-any
Specify valid cases for user-defined symbol names.
-@samp{-fsymbol-case-any} is the default.
+@option{-fsymbol-case-any} is the default.
@cindex -fcase-strict-upper option
@cindex options, -fcase-strict-upper
@cindex @code{badu77} intrinsics
@cindex intrinsics, @code{badu77}
Specify status of UNIX intrinsics having inappropriate forms.
-@samp{-fbadu77-intrinsics-enable} is the default.
+@option{-fbadu77-intrinsics-enable} is the default.
@xref{Intrinsic Groups}.
@cindex -ff2c-intrinsics-delete option
@cindex -ff2c-intrinsics-enable option
@cindex options, -ff2c-intrinsics-enable
@item -ff2c-intrinsics-enable
-@cindex @code{f2c} intrinsics
-@cindex intrinsics, @code{f2c}
+@cindex @command{f2c} intrinsics
+@cindex intrinsics, @command{f2c}
Specify status of f2c-specific intrinsics.
-@samp{-ff2c-intrinsics-enable} is the default.
+@option{-ff2c-intrinsics-enable} is the default.
@xref{Intrinsic Groups}.
@cindex -ff90-intrinsics-delete option
@cindex Fortran 90, intrinsics
@cindex intrinsics, Fortran 90
Specify status of F90-specific intrinsics.
-@samp{-ff90-intrinsics-enable} is the default.
+@option{-ff90-intrinsics-enable} is the default.
@xref{Intrinsic Groups}.
@cindex -fgnu-intrinsics-delete option
@cindex @code{COMPLEX} intrinsics
@cindex intrinsics, @code{COMPLEX}
Specify status of Digital's COMPLEX-related intrinsics.
-@samp{-fgnu-intrinsics-enable} is the default.
+@option{-fgnu-intrinsics-enable} is the default.
@xref{Intrinsic Groups}.
@cindex -fmil-intrinsics-delete option
@cindex MIL-STD 1753
@cindex intrinsics, MIL-STD 1753
Specify status of MIL-STD-1753-specific intrinsics.
-@samp{-fmil-intrinsics-enable} is the default.
+@option{-fmil-intrinsics-enable} is the default.
@xref{Intrinsic Groups}.
@cindex -funix-intrinsics-delete option
@cindex UNIX intrinsics
@cindex intrinsics, UNIX
Specify status of UNIX intrinsics.
-@samp{-funix-intrinsics-enable} is the default.
+@option{-funix-intrinsics-enable} is the default.
@xref{Intrinsic Groups}.
@cindex -fvxt-intrinsics-delete option
@cindex VXT intrinsics
@cindex intrinsics, VXT
Specify status of VXT intrinsics.
-@samp{-fvxt-intrinsics-enable} is the default.
+@option{-fvxt-intrinsics-enable} is the default.
@xref{Intrinsic Groups}.
@cindex -ffixed-line-length-@var{n} option
@var{n} may be @samp{none}, meaning that the entire line is meaningful
and that continued character constants never have implicit spaces appended
to them to fill out the line.
-@samp{-ffixed-line-length-0} means the same thing as
-@samp{-ffixed-line-length-none}.
+@option{-ffixed-line-length-0} means the same thing as
+@option{-ffixed-line-length-none}.
@xref{Source Form}, for more information.
@end table
are not inherently erroneous but which are risky or suggest there
might have been an error.
-You can request many specific warnings with options beginning @samp{-W},
-for example @samp{-Wimplicit} to request warnings on implicit
+You can request many specific warnings with options beginning @option{-W},
+for example @option{-Wimplicit} to request warnings on implicit
declarations. Each of these specific warning options also has a
-negative form beginning @samp{-Wno-} to turn off warnings;
-for example, @samp{-Wno-implicit}. This manual lists only one of the
+negative form beginning @option{-Wno-} to turn off warnings;
+for example, @option{-Wno-implicit}. This manual lists only one of the
two forms, whichever is not the default.
These options control the amount and kinds of warnings produced by GNU
Fortran:
-@table @code
+@table @gcctabopt
@cindex syntax checking
@cindex -fsyntax-only option
@cindex options, -fsyntax-only
@cindex options, -pedantic
@item -pedantic
Issue warnings for uses of extensions to ANSI FORTRAN 77.
-@samp{-pedantic} also applies to C-language constructs where they
+@option{-pedantic} also applies to C-language constructs where they
occur in GNU Fortran source files, such as use of @samp{\e} in a
character constant within a directive like @samp{#include}.
Fortran features are supported as well.
With this option, many of them are rejected.
-Some users try to use @samp{-pedantic} to check programs for strict ANSI
+Some users try to use @option{-pedantic} to check programs for strict ANSI
conformance.
They soon find that it does not do quite what they want---it finds some
non-ANSI practices, but not all.
-However, improvements to @code{g77} in this area are welcome.
+However, improvements to @command{g77} in this area are welcome.
@cindex -pedantic-errors option
@cindex options, -pedantic-errors
@item -pedantic-errors
-Like @samp{-pedantic}, except that errors are produced rather than
+Like @option{-pedantic}, except that errors are produced rather than
warnings.
@cindex -fpedantic option
@cindex options, -fpedantic
@item -fpedantic
-Like @samp{-pedantic}, but applies only to Fortran constructs.
+Like @option{-pedantic}, but applies only to Fortran constructs.
@cindex -w option
@cindex options, -w
Has an effect similar to using the @code{IMPLICIT NONE} statement
in every program unit.
(Some Fortran compilers provide this feature by an option
-named @samp{-u} or @samp{/WARNINGS=DECLARATIONS}.)
+named @option{-u} or @samp{/WARNINGS=DECLARATIONS}.)
@cindex -Wunused option
@cindex options, -Wunused
These warnings are possible only in optimizing compilation,
because they require data-flow information that is computed only
-when optimizing. If you don't specify @samp{-O}, you simply won't
+when optimizing. If you don't specify @option{-O}, you simply won't
get these warnings.
These warnings occur only for variables that are candidates for
@item -Wall
@cindex all warnings
@cindex warnings, all
-The @samp{-Wunused} and @samp{-Wuninitialized} options combined.
+The @option{-Wunused} and @option{-Wuninitialized} options combined.
These are all the
options which pertain to usage that we recommend avoiding and that we
believe is easy to avoid.
-(As more warnings are added to @code{g77}, some might
-be added to the list enabled by @samp{-Wall}.)
+(As more warnings are added to @command{g77} some might
+be added to the list enabled by @option{-Wall}.)
@end table
-The remaining @samp{-W@dots{}} options are not implied by @samp{-Wall}
+The remaining @option{-W@dots{}} options are not implied by @option{-Wall}
because they warn about constructions that we consider reasonable to
use, on occasion, in clean programs.
-@table @code
+@table @gcctabopt
@c @item -W
@c Print extra warning messages for these events:
@c
@c @itemize @bullet
@c @item
-@c If @samp{-Wall} or @samp{-Wunused} is also specified, warn about unused
+@c If @option{-Wall} or @option{-Wunused} is also specified, warn about unused
@c arguments.
@c
@c @end itemize
Such a construct is nonstandard, and can produce
unexpected results in more complicated situations such
as @samp{X**-Y*Z}.
-@code{g77}, along with many other compilers, interprets
+@command{g77} along with many other compilers, interprets
this example differently than many programmers, and a few
other compilers.
-Specifically, @code{g77} interprets @samp{X**-Y*Z} as
+Specifically, @command{g77} interprets @samp{X**-Y*Z} as
@samp{(X**(-Y))*Z}, while others might think it should
be interpreted as @samp{X**(-(Y*Z))}.
A revealing example is the constant expression @samp{2**-2*1.},
-which @code{g77} evaluates to .25, while others might evaluate
+which @command{g77} evaluates to .25, while others might evaluate
it to 0., the difference resulting from the way precedence affects
type promotion.
-(The @samp{-fpedantic} option also warns about expressions
+(The @option{-fpedantic} option also warns about expressions
having two arithmetic operators in a row.)
@item
of integral type---that is, using @code{REAL}
variables as loop control variables.
Although such loops can be written to work in the
-``obvious'' way, the way @code{g77} is required by the
+``obvious'' way, the way @command{g77} is required by the
Fortran standard to interpret such code is likely to
be quite different from the way many programmers expect.
(This is true of all @code{DO} loops, but the differences
@cindex extra warnings
@cindex warnings, extra
Turns on ``extra warnings'' and, if optimization is specified
-via @samp{-O}, the @samp{-Wuninitialized} option.
-(This might change in future versions of @code{g77}.)
+via @option{-O}, the @option{-Wuninitialized} option.
+(This might change in future versions of @command{g77}
``Extra warnings'' are issued for:
@cindex arguments, unused
@cindex unused dummies
@cindex dummies, unused
-Unused parameters to a procedure (when @samp{-Wunused} also is
+Unused parameters to a procedure (when @option{-Wunused} also is
specified).
@item
@end table
@xref{Warning Options,,Options to Request or Suppress Warnings,
-gcc,Using and Porting GNU CC}, for information on more options offered
-by the GBE shared by @code{g77}, @code{gcc}, and other GNU compilers.
+gcc,Using the GNU Compiler Collection (GCC)}, for information on more
+options offered
+by the GBE shared by @command{g77} @command{gcc} and other GNU compilers.
Some of these have no effect when compiling programs written in Fortran:
-@table @code
+@table @gcctabopt
@cindex -Wcomment option
@cindex options, -Wcomment
@item -Wcomment
@cindex -Wswitch option
@cindex options, -Wswitch
@item -Wswitch
+@cindex -Wswitch-default option
+@cindex options, -Wswitch-default
+@item -Wswitch-default
+@cindex -Wswitch-enum option
+@cindex options, -Wswitch-enum
+@item -Wswitch-enum
@cindex -Wtraditional option
@cindex options, -Wtraditional
@item -Wtraditional
@cindex debugging information options
GNU Fortran has various special options that are used for debugging
-either your program or @code{g77}.
+either your program or @command{g77}
-@table @code
+@table @gcctabopt
@cindex -g option
@cindex options, -g
@item -g
Produce debugging information in the operating system's native format
(stabs, COFF, XCOFF, or DWARF). GDB can work with this debugging
information.
+
+A sample debugging session looks like this (note the use of the breakpoint):
+@smallexample
+$ cat gdb.f
+ PROGRAM PROG
+ DIMENSION A(10)
+ DATA A /1.,2.,3.,4.,5.,6.,7.,8.,9.,10./
+ A(5) = 4.
+ PRINT*,A
+ END
+$ g77 -g -O gdb.f
+$ gdb a.out
+...
+(gdb) break MAIN__
+Breakpoint 1 at 0x8048e96: file gdb.f, line 4.
+(gdb) run
+Starting program: /home/toon/g77-bugs/./a.out
+Breakpoint 1, MAIN__ () at gdb.f:4
+4 A(5) = 4.
+Current language: auto; currently fortran
+(gdb) print a(5)
+$1 = 5
+(gdb) step
+5 PRINT*,A
+(gdb) print a(5)
+$2 = 4
+...
+@end smallexample
+One could also add the setting of the breakpoint and the first run command
+to the file @file{.gdbinit} in the current directory, to simplify the debugging
+session.
@end table
-@xref{Debugging Options,,Options for Debugging Your Program or GNU CC,
-gcc,Using and Porting GNU CC}, for more information on debugging options.
+@xref{Debugging Options,,Options for Debugging Your Program or GCC,
+gcc,Using the GNU Compiler Collection (GCC)}, for more information on
+debugging options.
@node Optimize Options
@section Options That Control Optimization
@cindex options, optimization
Most Fortran users will want to use no optimization when
-developing and testing programs, and use @samp{-O} or @samp{-O2} when
+developing and testing programs, and use @option{-O} or @option{-O2} when
compiling programs for late-cycle testing and for production use.
However, note that certain diagnostics---such as for uninitialized
-variables---depend on the flow analysis done by @samp{-O}, i.e.@: you
-must use @samp{-O} or @samp{-O2} to get such diagnostics.
+variables---depend on the flow analysis done by @option{-O}, i.e.@: you
+must use @option{-O} or @option{-O2} to get such diagnostics.
The following flags have particular applicability when
compiling Fortran programs:
-@table @code
+@table @gcctabopt
@cindex -malign-double option
@cindex options, -malign-double
@item -malign-double
(Intel x86 architecture only.)
-Noticeably improves performance of @code{g77} programs making
+Noticeably improves performance of @command{g77} programs making
heavy use of @code{REAL(KIND=2)} (@code{DOUBLE PRECISION}) data
on some systems.
In particular, systems using Pentium, Pentium Pro, 586, and
across various system configurations, versions of the program,
and data sets.
-@emph{Note:} The warning in the @code{gcc} documentation about
+@emph{Note:} The warning in the @command{gcc} documentation about
this option does not apply, generally speaking, to Fortran
-code compiled by @code{g77}.
+code compiled by @command{g77}
@xref{Aligned Data}, for more information on alignment issues.
-@emph{Also also note:} The negative form of @samp{-malign-double}
-is @samp{-mno-align-double}, not @samp{-benign-double}.
+@emph{Also also note:} The negative form of @option{-malign-double}
+is @option{-mno-align-double}, not @option{-benign-double}.
@cindex -ffloat-store option
@cindex options, -ffloat-store
This option is effective when the floating-point unit is set to work in
IEEE 854 `extended precision'---as it typically is on x86 and m68k GNU
-systems---rather than IEEE 754 double precision. @samp{-ffloat-store}
+systems---rather than IEEE 754 double precision. @option{-ffloat-store}
tries to remove the extra precision by spilling data from floating-point
registers into memory and this typically involves a big performance
hit. However, it doesn't affect intermediate results, so that it is
@item -fno-inline
@cindex in-line code
@cindex compilation, in-line
-@c DL: Only relevant for -O3?
+@c DL: Only relevant for -O3? TM: No, statement functions are
+@c inlined even at -O1.
Don't compile statement functions inline.
Might reduce the size of a program unit---which might be at
expense of some speed (though it should compile faster).
@cindex conformance, IEEE 754
Might allow some programs designed to not be too dependent
on IEEE behavior for floating-point to run faster, or die trying.
-Sets @samp{-funsafe-math-optimizations}, and
-@samp{-fno-trapping-math}.
+Sets @option{-funsafe-math-optimizations}, and
+@option{-fno-trapping-math}.
@cindex -funsafe-math-optimizations option
@cindex options, -funsafe-math-optimizations
@c DL: Check my understanding of -funroll-all-loops v. -funroll-loops is correct.
Probably improves performance on code using @code{DO WHILE} loops by
unrolling them in addition to iterative @code{DO} loops. In the absence
-of @code{DO WHILE}, this option is equivalent to @samp{-funroll-loops}
+of @code{DO WHILE}, this option is equivalent to @option{-funroll-loops}
but possibly slower.
@item -fno-move-all-movables
@cindex options, -fno-rerun-loop-opt
@emph{Version info:}
These options are not supported by
-versions of @code{g77} based on @code{gcc} version 2.8.
+versions of @command{g77} based on @command{gcc} version 2.8.
Each of these might improve performance on some code.
We're particularly interested in code that runs faster
when these options are @emph{disabled}, and in
non-Fortran code that benefits when they are
-@emph{enabled} via the above @code{gcc} command-line options.
+@emph{enabled} via the above @command{gcc} command-line options.
@end table
@xref{Optimize Options,,Options That Control Optimization,
-gcc,Using and Porting GNU CC}, for more information on options
+gcc,Using the GNU Compiler Collection (GCC)}, for more information on options
to optimize the generated machine code.
@node Preprocessor Options
file before actual compilation.
@xref{Preprocessor Options,,Options Controlling the Preprocessor,
-gcc,Using and Porting GNU CC}, for information on C preprocessor options.
+gcc,Using the GNU Compiler Collection (GCC)}, for information on C
+preprocessor options.
@cindex INCLUDE directive
@cindex directive, INCLUDE
-Some of these options also affect how @code{g77} processes the
+Some of these options also affect how @command{g77} processes the
@code{INCLUDE} directive.
Since this directive is processed even when preprocessing
is not requested, it is not described in this section.
@xref{Directory Options,,Options for Directory Search}, for
-information on how @code{g77} processes the @code{INCLUDE} directive.
+information on how @command{g77} processes the @code{INCLUDE} directive.
However, the @code{INCLUDE} directive does not apply
preprocessing to the contents of the included file itself.
@cindex options, directory search
@cindex search path
-These options affect how the @code{cpp} preprocessor searches
+These options affect how the @command{cpp} preprocessor searches
for files specified via the @code{#include} directive.
Therefore, when compiling Fortran programs, they are meaningful
when the preprocessor is used.
@cindex INCLUDE directive
@cindex directive, INCLUDE
-Some of these options also affect how @code{g77} searches
+Some of these options also affect how @command{g77} searches
for files specified via the @code{INCLUDE} directive,
although files included by that directive are not,
themselves, preprocessed.
These options are:
-@table @code
+@table @gcctabopt
@cindex -I- option
@cindex options, -I-
@item -I-
@cindex search paths, for included files
@cindex paths, search
These affect interpretation of the @code{INCLUDE} directive
-(as well as of the @code{#include} directive of the @code{cpp}
+(as well as of the @code{#include} directive of the @command{cpp}
preprocessor).
-Note that @samp{-I@var{dir}} must be specified @emph{without} any
-spaces between @samp{-I} and the directory name---that is,
-@samp{-Ifoo/bar} is valid, but @samp{-I foo/bar}
-is rejected by the @code{g77} compiler (though the preprocessor supports
+Note that @option{-I@var{dir}} must be specified @emph{without} any
+spaces between @option{-I} and the directory name---that is,
+@option{-Ifoo/bar} is valid, but @option{-I foo/bar}
+is rejected by the @command{g77} compiler (though the preprocessor supports
the latter form).
@c this is due to toplev.c's inflexible option processing
-Also note that the general behavior of @samp{-I} and
-@code{INCLUDE} is pretty much the same as of @samp{-I} with
-@code{#include} in the @code{cpp} preprocessor, with regard to
+Also note that the general behavior of @option{-I} and
+@code{INCLUDE} is pretty much the same as of @option{-I} with
+@code{#include} in the @command{cpp} preprocessor, with regard to
looking for @file{header.gcc} files and other such things.
@xref{Directory Options,,Options for Directory Search,
-gcc,Using and Porting GNU CC}, for information on the @samp{-I} option.
+gcc,Using the GNU Compiler Collection (GCC)}, for information on the
+@option{-I} option.
@end table
@node Code Gen Options
used in code generation.
Most of them have both positive and negative forms; the negative form
-of @samp{-ffoo} would be @samp{-fno-foo}. In the table below, only
+of @option{-ffoo} would be @option{-fno-foo}. In the table below, only
one of the forms is listed---the one which is not the default. You
-can figure out the other form by either removing @samp{no-} or adding
+can figure out the other form by either removing @option{no-} or adding
it.
-@table @code
+@table @gcctabopt
@cindex -fno-automatic option
@cindex options, -fno-automatic
@item -fno-automatic
for every local variable and array referenced in it.
Does not affect common blocks.
(Some Fortran compilers provide this option under
-the name @samp{-static}.)
+the name @option{-static}.)
@cindex -finit-local-zero option
@cindex options, -finit-local-zero
Since there is a run-time penalty for initialization of variables
that are not given the @code{SAVE} attribute, it might be a
-good idea to also use @samp{-fno-automatic} with @samp{-finit-local-zero}.
+good idea to also use @option{-fno-automatic} with @option{-finit-local-zero}.
@cindex -fno-f2c option
@cindex options, -fno-f2c
@item -fno-f2c
-@cindex @code{f2c} compatibility
-@cindex compatibility, @code{f2c}
+@cindex @command{f2c} compatibility
+@cindex compatibility, @command{f2c}
Do not generate code designed to be compatible with code generated
-by @code{f2c}; use the GNU calling conventions instead.
+by @command{f2c} use the GNU calling conventions instead.
-The @code{f2c} calling conventions require functions that return
+The @command{f2c} calling conventions require functions that return
type @code{REAL(KIND=1)} to actually return the C type @code{double},
and functions that return type @code{COMPLEX} to return the
values via an extra argument in the calling sequence that points
This does not affect the generation of code that interfaces with the
@code{libg2c} library.
-However, because the @code{libg2c} library uses @code{f2c}
-calling conventions, @code{g77} rejects attempts to pass
+However, because the @code{libg2c} library uses @command{f2c}
+calling conventions, @command{g77} rejects attempts to pass
intrinsics implemented by routines in this library as actual
-arguments when @samp{-fno-f2c} is used, to avoid bugs when
+arguments when @option{-fno-f2c} is used, to avoid bugs when
they are actually called by code expecting the GNU calling
conventions to work.
For example, @samp{INTRINSIC ABS;CALL FOO(ABS)} is
-rejected when @samp{-fno-f2c} is in force.
-(Future versions of the @code{g77} run-time library might
+rejected when @option{-fno-f2c} is in force.
+(Future versions of the @command{g77} run-time library might
offer routines that provide GNU-callable versions of the
-routines that implement the @code{f2c}-callable intrinsics
+routines that implement the @command{f2c} intrinsics
that may be passed as actual arguments, so that
-valid programs need not be rejected when @samp{-fno-f2c}
+valid programs need not be rejected when @option{-fno-f2c}
is used.)
-@strong{Caution:} If @samp{-fno-f2c} is used when compiling any
+@strong{Caution:} If @option{-fno-f2c} is used when compiling any
source file used in a program, it must be used when compiling
@emph{all} Fortran source files used in that program.
@item -ff2c-library
Specify that use of @code{libg2c} (or the original @code{libf2c})
is required.
-This is the default for the current version of @code{g77}.
+This is the default for the current version of @command{g77}
Currently it is not
-valid to specify @samp{-fno-f2c-library}.
+valid to specify @option{-fno-f2c-library}.
This option is provided so users can specify it in shell
scripts that build programs and libraries that require the
@code{libf2c} library, even when being compiled by future
-versions of @code{g77} that might otherwise default to
+versions of @command{g77} that might otherwise default to
generating code for an incompatible library.
@cindex -fno-underscoring option
Do not transform names of entities specified in the Fortran
source file by appending underscores to them.
-With @samp{-funderscoring} in effect, @code{g77} appends two underscores
+With @option{-funderscoring} in effect, @command{g77} appends two underscores
to names with underscores and one underscore to external names with
-no underscores. (@code{g77} also appends two underscores to internal
+no underscores. (@command{g77} also appends two underscores to internal
names with underscores to avoid naming collisions with external names.
-The @samp{-fno-second-underscore} option disables appending of the
+The @option{-fno-second-underscore} option disables appending of the
second underscore in all cases.)
This is done to ensure compatibility with code produced by many
-UNIX Fortran compilers, including @code{f2c}, which perform the
+UNIX Fortran compilers, including @command{f2c} which perform the
same transformations.
-Use of @samp{-fno-underscoring} is not recommended unless you are
+Use of @option{-fno-underscoring} is not recommended unless you are
experimenting with issues such as integration of (GNU) Fortran into
existing system environments (vis-a-vis existing libraries, tools, and
so on).
-For example, with @samp{-funderscoring}, and assuming other defaults like
-@samp{-fcase-lower} and that @samp{j()} and @samp{max_count()} are
+For example, with @option{-funderscoring}, and assuming other defaults like
+@option{-fcase-lower} and that @samp{j()} and @samp{max_count()} are
external functions while @samp{my_var} and @samp{lvar} are local variables,
a statement like
i = j_() + max_count__(&my_var__, &lvar);
@end smallexample
-With @samp{-fno-underscoring}, the same statement is implemented as:
+With @option{-fno-underscoring}, the same statement is implemented as:
@smallexample
i = j() + max_count(&my_var, &lvar);
@end smallexample
-Use of @samp{-fno-underscoring} allows direct specification of
-user-defined names while debugging and when interfacing @code{g77}-compiled
+Use of @option{-fno-underscoring} allows direct specification of
+user-defined names while debugging and when interfacing @command{g77}
code with other languages.
Note that just because the names match does @emph{not} mean that the
-interface implemented by @code{g77} for an external name matches the
+interface implemented by @command{g77} for an external name matches the
interface implemented by some other language for that same name.
-That is, getting code produced by @code{g77} to link to code produced
+That is, getting code produced by @command{g77} to link to code produced
by some other compiler using this or any other method can be only a
small part of the overall solution---getting the code generated by
both compilers to agree on issues other than naming can require
significant effort, and, unlike naming disagreements, linkers normally
cannot detect disagreements in these other areas.
-Also, note that with @samp{-fno-underscoring}, the lack of appended
+Also, note that with @option{-fno-underscoring}, the lack of appended
underscores introduces the very real possibility that a user-defined
external name will conflict with a name in a system library, which
could make finding unresolved-reference bugs quite difficult in some
cases---they might occur at program run time, and show up only as
buggy behavior at run time.
-In future versions of @code{g77}, we hope to improve naming and linking
+In future versions of @command{g77} we hope to improve naming and linking
issues so that debugging always involves using the names as they appear
in the source, even if the names as seen by the linker are mangled to
prevent accidental linking between procedures with incompatible
Do not append a second underscore to names of entities specified
in the Fortran source file.
-This option has no effect if @samp{-fno-underscoring} is
+This option has no effect if @option{-fno-underscoring} is
in effect.
Otherwise, with this option, an external name such as @samp{MAX_COUNT}
@item -fzeros
Treat initial values of zero as if they were any other value.
-As of version 0.5.18, @code{g77} normally treats @code{DATA} and
+As of version 0.5.18, @command{g77} normally treats @code{DATA} and
other statements that are used to specify initial values of zero
for variables and arrays as if no values were actually specified,
in the sense that no diagnostics regarding multiple initializations
This is done to speed up compiling of programs that initialize
large arrays to zeros.
-Use @samp{-fzeros} to revert to the simpler, slower behavior
+Use @option{-fzeros} to revert to the simpler, slower behavior
that can catch multiple initializations by keeping track of
all initializations, zero or otherwise.
-@emph{Caution:} Future versions of @code{g77} might disregard this option
+@emph{Caution:} Future versions of @command{g77} might disregard this option
(and its negative form, the default) or interpret it somewhat
differently.
The interpretation changes will affect only non-standard
@item -femulate-complex
Implement @code{COMPLEX} arithmetic via emulation,
instead of using the facilities of
-the @code{gcc} back end that provide direct support of
+the @command{gcc} back end that provide direct support of
@code{complex} arithmetic.
-(@code{gcc} had some bugs in its back-end support
+(@command{gcc} had some bugs in its back-end support
for @code{complex} arithmetic, due primarily to the support not being
completed as of version 2.8.1 and @code{egcs} 1.1.2.)
-Use @samp{-femulate-complex} if you suspect code-generation bugs,
+Use @option{-femulate-complex} if you suspect code-generation bugs,
or experience compiler crashes,
-that might result from @code{g77} using the @code{COMPLEX} support
-in the @code{gcc} back end.
+that might result from @command{g77} using the @code{COMPLEX} support
+in the @command{gcc} back end.
If using that option fixes the bugs or crashes you are seeing,
-that indicates a likely @code{g77} bugs
+that indicates a likely @command{g77} bugs
(though, all compiler crashes are considered bugs),
so, please report it.
(Note that the known bugs, now believed fixed, produced compiler crashes
rather than causing the generation of incorrect code.)
Use of this option should not affect how Fortran code compiled
-by @code{g77} works in terms of its interfaces to other code,
-e.g. that compiled by @code{f2c}.
+by @command{g77} works in terms of its interfaces to other code,
+e.g. that compiled by @command{f2c}
+
+As of GCC version 3.0, this option is not necessary anymore.
-@emph{Caution:} Future versions of @code{g77} might ignore both forms
+@emph{Caution:} Future versions of @command{g77} might ignore both forms
of this option.
@cindex -falias-check option
@item -fno-argument-noalias-global
@emph{Version info:}
These options are not supported by
-versions of @code{g77} based on @code{gcc} version 2.8.
+versions of @command{g77} based on @command{gcc} version 2.8.
These options specify to what degree aliasing
(overlap)
public) storage.
The default for Fortran code, as mandated by the FORTRAN 77 and
-Fortran 90 standards, is @samp{-fargument-noalias-global}.
+Fortran 90 standards, is @option{-fargument-noalias-global}.
The default for code written in the C language family is
-@samp{-fargument-alias}.
+@option{-fargument-alias}.
-Note that, on some systems, compiling with @samp{-fforce-addr} in
+Note that, on some systems, compiling with @option{-fforce-addr} in
effect can produce more optimal code when the default aliasing
options are in effect (and when optimization is enabled).
to inline a reference to a procedure within a
program unit.
(The diagnostics themselves are still produced, but
-as warnings, unless @samp{-Wno-globals} is specified,
+as warnings, unless @option{-Wno-globals} is specified,
in which case no relevant diagnostics are produced.)
Further, this option disables such inlining, to
As such, this option might be quite useful when
compiling existing, ``working'' code that happens
to have a few bugs that do not generally show themselves,
-but which @code{g77} diagnoses.
+but which @command{g77} diagnoses.
Use of this option therefore has the effect of
-instructing @code{g77} to behave more like it did
+instructing @command{g77} to behave more like it did
up through version 0.5.19.1, when it paid little or
no attention to disagreements between program units
about a procedure's type and argument information,
and when it performed no inlining of procedures
(except statement functions).
-Without this option, @code{g77} defaults to performing
+Without this option, @command{g77} defaults to performing
the potentially inlining procedures as it started doing
in version 0.5.20, but as of version 0.5.21, it also
diagnoses disagreements that might cause such inlining
to handle all array references.
@emph{Note:} This option is not supported.
-It is intended for use only by @code{g77} developers,
+It is intended for use only by @command{g77} developers,
to evaluate code-generation issues.
It might be removed at any time.
The current implementation uses the @code{libf2c}
library routine @code{s_rnge} to print the diagnostic.
-However, whereas @code{f2c} generates a single check per
+However, whereas @command{f2c} generates a single check per
reference for a multi-dimensional array, of the computed
offset against the valid offset range (0 through the size of the array),
-@code{g77} generates a single check per @emph{subscript} expression.
-This catches some cases of potential bugs that @code{f2c} does not,
+@command{g77} generates a single check per @emph{subscript} expression.
+This catches some cases of potential bugs that @command{f2c} does not,
such as references to below the beginning of an assumed-size array.
-@code{g77} also generates checks for @code{CHARACTER} substring references,
-something @code{f2c} currently does not do.
+@command{g77} also generates checks for @code{CHARACTER} substring references,
+something @command{f2c} currently does not do.
-Use the new @samp{-ffortran-bounds-check} option
+Use the new @option{-ffortran-bounds-check} option
to specify bounds-checking for only the Fortran code you are compiling,
not necessarily for code written in other languages.
@emph{Note:} To provide more detailed information on the offending subscript,
-@code{g77} provides the @code{libg2c} run-time library routine @code{s_rnge}
+@command{g77} provides the @code{libg2c} run-time library routine @code{s_rnge}
with somewhat differently-formatted information.
Here's a sample diagnostic:
and the offending substring expression is @samp{11}.
(Though the verbage of @code{s_rnge} is not ideal
-for the purpose of the @code{g77} compiler,
+for the purpose of the @command{g77} compiler,
the above information should provide adequate diagnostic abilities
to it users.)
@end table
@xref{Code Gen Options,,Options for Code Generation Conventions,
-gcc,Using and Porting GNU CC}, for information on more options
+gcc,Using the GNU Compiler Collection (GCC)}, for information on more options
offered by the GBE
-shared by @code{g77}, @code{gcc}, and other GNU compilers.
+shared by @command{g77} @command{gcc} and other GNU compilers.
Some of these do @emph{not} work when compiling programs written in Fortran:
-@table @code
+@table @gcctabopt
@cindex -fpcc-struct-return option
@cindex options, -fpcc-struct-return
@item -fpcc-struct-return
@item -freg-struct-return
You should not use these except strictly the same way as you
used them to build the version of @code{libg2c} with which
-you will be linking all code compiled by @code{g77} with the
+you will be linking all code compiled by @command{g77} with the
same option.
@cindex -fshort-double option
GNU Fortran currently does not make use of any environment
variables to control its operation above and beyond those
-that affect the operation of @code{gcc}.
+that affect the operation of @command{gcc}.
-@xref{Environment Variables,,Environment Variables Affecting GNU CC,
-gcc,Using and Porting GNU CC}, for information on environment
+@xref{Environment Variables,,Environment Variables Affecting GCC,
+gcc,Using the GNU Compiler Collection (GCC)}, for information on environment
variables.
@c man end