Use this setting to catch language extensions which violate
the Fortran 77 Standard. Such extensions may cause your program not
to be portable. Examples include the use of underscores in variable
names; variable names longer than six characters; statement lines
longer than 72 characters; and nonstandard statements such as the
DO ... ENDDO structure. ftnchek does not report on
the use of lowercase letters.
By default, all warnings are turned off.
This setting provides detailed control over the warnings about
supported extensions to the Fortran 77 Standard.
(Further details about the extensions themselves are given below in the
section on Extensions.)
consists of keywords separated by commas or colons.
There are three special keywords: all to turn on all the
warnings about nonstandard extensions, none to turn them all
off, and help to print the list of all the keywords with a brief
explanation of each.
If list is omitted, -f77 is equivalent to
-f77=all, and -nof77 is equivalent to
The warning keywords with their meanings are as follows:
ACCEPT and TYPE I/O statements.
Expressions defining array bounds that contain array elements or function
Assignment statements involving arrays. In Fortran 90, an array can
be assigned to another array of compatible shape, or a scalar can be
assigned to an array. Neither of these assignments is permitted in
A related warning occurs when an array is assigned to a
scalar. Since this is illegal also in Fortran 90, it is always warned
about regardless of the -f77 setting (unless all checking is
turned off with the -nocheck flag).
Type declarations in the new Fortran 90 attribute-based style.
This style of declaration is distinguished by the use of
a double colon (::) between the list of attributes and the list of
This option also controls warnings for use of Fortran 90 length or kind
specifiers in type declarations. (Although these specifiers can be
used in non-attribute-based declarations, they are controlled by this
option to avoid proliferation of -f77 options.)
Local (not dummy) arrays which have variable size. These would
correspond to arrays whose storage would have to be dynamically allocated at
Unix backslash escape in strings. This warning will be given only if
the -source=unix-backslash setting is specified to cause
the escape interpretation of backslash..
BYTE data type declaration.
The SELECT CASE construct.
Extensions to the Fortran 77 standard regarding character data. At
present, this only controls warnings about character variables
declared with zero or negative length. In Fortran 77, all character
variables must be of positive length. In Fortran 90, they can be zero
length, and declarations that specify negative lengths are permitted,
turning into zero for the declared length. Note: because negative
length specifiers may indicate a programming error, the warning about
them is given even if this option is turned off, and is suppressed
only by the -nocheck flag.
Common block and subprogram having the same name.
Use of a construct-name to label a control statement.
More than 19 successive continuation lines.
Unix C preprocessor directives in the source code.
``Cray pointer'' syntax.
The CYCLE and EXIT statements.
Debugging comments starting with D in the source code.
DEC Fortran style tab-formatted source code. This warning will be
given only if the -source=dec-tab setting is specified to cause
interpretation of tabs in this style.
DO loop extensions: terminal statement label omitted, END DO,
Double precision complex datatype.
Dollar sign control code in FORMAT statements.
Nonstandard edit descriptors in FORMAT statements.
Function definition without parentheses.
IMPLICIT NONE statement.
Inline comments starting with an exclamation point.
List-directed I/O to or from an internal file.
Nonstandard intrinsic functions.
Nonstandard keywords used in I/O statements. These fall into three
groups. The first group includes keywords that are accepted in
The second group comprises the following VMS Fortran keywords:
(The keyword NAME is standard only in the INQUIRE
The third group consists of the following IBM/MVS keyword:
This flag also controls a warning about use of ACCESS='APPEND',
which is accepted by some compilers. The value of 'APPEND' is
not valid for any I/O specifier in standard Fortran 77, and in Fortran
90 'APPEND' should be used as a value of the POSITION
specifier, not ACCESS.
|DEFAULTFILE||NAME (in OPEN)||SHARED|
Statements with meaningful code past 72 columns. This warning is
given only if the -columns setting has been used to increase
the statement field width.
Identifiers over 6 characters long.
Mixed character and noncharacter data in COMMON block.
Nonstandard type combinations in expressions, for example DOUBLE
PRECISION with COMPLEX, assigning hollerith to integer,
logical operations on integers.
Dollar sign used as a character in identifiers.
Underscore used as a character in identifiers.
Implicit typing of a parameter by the data type of the value assigned.
This warning can only occur if implicit parameter typing has been
turned on by the -source=param-implicit-type option, or
if the PARAMETER statement is of the nonstandard form without
parentheses. If this option is turned on,
then any instances where implicit parameter typing occurs will be
If you want to be warned only in those instances
where the implicit data type differs from the default type, use
-portability=param-implicit-type instead. According to the Fortran
77 standard, the data type of a parameter is given by the same rules
as for a variable, and if necessary a type conversion is done when the
value is assigned.
Intrinsic function or exponentiation by a real used to define the value
of a PARAMETER definition.
PARAMETER statement without parentheses. The user should be
aware that the semantics of this form of the statement differs from
that of the standard form: in this form, the parameter takes its data
type from the value assigned, rather than having its default data type
based on the first letter of the parameter name. (This form of the
PARAMETER statement was introduced by DEC before the Fortran 77
standard was defined, and should be avoided.)
Fortran 90 standard pointer-related syntax, including POINTER,
TARGET and ALLOCATABLE type declarations, ALLOCATE,
DEALLOCATE, and NULLIFY statements, and pointer assignment
Quad precision real constants, e.g. of the form 1.23Q4.
Strings delimited by quote marks rather than apostrophes.
Relational (comparison) operators composed of punctuation, namely: <
<= == /= > >=.
Semicolon used as statement separator.
Statements out of the sequence mandated by the Standard. The allowed
sequence is illustrated in Table 1 in the section on Interpreting the
Typeless constants, for example Z'19AF'.
Type declarations specifying a size, for example REAL*8.
Variable repeat specification or field size in FORMAT. These
are of the form < expr >.
Obsolete. Now has the same meaning as the io-keywords keyword.
See also: -f90, -f95, -portability,
-pretty, -style, -wordsize.