Table of Contents
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. The
list 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 -f77=none . The warning keywords
with their meanings are as follows. (Further details about the extensions
themselves are given below in the section on Extensions.)
- ACCEPT and TYPE I/O statements.
- Expressions defining array
bounds that contain array elements or function references.
- 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 Fortran 77.
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
- Local (not dummy) arrays which have variable
size. These would correspond to arrays whose storage would have to be
dynamically allocated at run time.
- 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.
- Common block and subprogram
having the same name.
- Use of a construct-name to label a
- More than 19 successive continuation
- Unix C preprocessor directives in the source code.
- 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.
loop extensions: terminal statement label omitted, END DO , and WHILE
- Double precision complex datatype.
- Dollar sign control code in FORMAT statements.
edit descriptors in FORMAT statements.
- Function definition
- IMPLICIT NONE statement.
- INCLUDE statement.
- Inline comments starting with an exclamation
- 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 Fortran 90:
second group comprises the following VMS Fortran keywords:
|ACTION ||PAD ||READWRITE
|ADVANCE ||POSITION ||SIZE |
|DELIM ||READ ||WRITE |
(The keyword NAME is standard only in the INQUIRE statement.) The third
group consists of the following IBM/MVS keyword:
||EXTENDSIZE ||READONLY |
|BUFFERCOUNT ||INITIALSIZE ||RECORDSIZE |
|CARRIAGECONTROL ||MAXREC ||RECORDTYPE |
|DEFAULTFILE ||NAME (in OPEN
) ||SHARED |
|DISP ||NOSPANBLOCK ||TYPE |
|DISPOSE ||ORGANIZATION |
- Statements with meaningful code past 72 columns. This warning is given
only if the -columns setting has been used to increase the statement field
- Identifiers over 6 characters long.
character and noncharacter data in COMMON block.
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.
used as a character in identifiers.
- NAMELIST statement.
- 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=parameter-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
warned about. 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.
function or exponentiation by a real used to define the value of a PARAMETER
- 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.)
- ``Cray pointer'' syntax.
- Quad precision real constants, e.g. of the form 1.23Q4 .
- Strings delimited by quote marks rather than apostrophes.
(comparison) operators composed of punctuation, namely: < <= == /= > >=.
- 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
See also: -f90 , -f95 , -portability , -pretty , -wordsize .