Table of Contents
Previous: -extern
Option: f77
-f77=list
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-type:
- ACCEPT and TYPE I/O statements.
- array-bounds:
- Expressions defining array bounds that contain array elements or function
references.
- assignment-stmt:
- 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 flag).
- automatic-array:
- Local (not dummy)
arrays which have variable size. These would correspond to arrays whose
storage would have to be dynamically allocated at run time.
- backslash:
- Unix backslash escape in strings. This warning will be given only if
the -source setting value 4 (UNIX backslash) is specified to cause the
escape interpretation of backslash..
- byte:
- BYTE data type declaration.
- common-subprog-name:
- Common block and subprogram having the same name.
- continuation:
- More than 19 successive continuation lines.
- cpp:
- Unix C preprocessor
directives in the source code.
- d-comment:
- Debugging comments starting with
D in the source code.
- dec-tab:
- DEC Fortran style tab-formatted source code.
This warning will be given only if the -source setting value 1 is specified
to cause interpretation of tabs in this style.
- do-enddo:
- DO loop extensions:
terminal statement label omitted, END DO , and WHILE .
- double-complex:
- Double precision complex datatype.
- format-dollarsign:
- Dollar sign control
code in FORMAT statements.
- format-edit-descr:
- Nonstandard edit descriptors
in FORMAT statements.
- function-noparen:
- Function definition without parentheses.
- implicit-none:
- IMPLICIT NONE statement.
- include:
- INCLUDE statement.
- inline-comment:
- Inline comments starting with an exclamation point.
- internal-list-io:
- List-directed
I/O to or from an internal file.
- intrinsic:
- Nonstandard intrinsic functions.
- long-line:
- 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.
- long-name:
- Identifiers over 6 characters long.
- mixed-common:
- Mixed character and noncharacter data in COMMON block.
- mixed-expr:
- Nonstandard
type combinations in expressions, for example DOUBLE PRECISION with COMPLEX
, assigning hollerith to integer, logical operations on integers.
- name-dollarsign:
- Dollar sign used as a character in identifiers.
- name-underscore:
- Underscore
used as a character in identifiers.
- namelist:
- NAMELIST statement.
- param-implicit-type:
- 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=8 option. If that option has been enabled, then any
instances where it occurs will be warned about if this flag is set. 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 the 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.
- param-intrinsic:
- Intrinsic
function or exponentiation by a real used to define the value of a PARAMETER
definition.
- param-noparen:
- PARAMETER statement without parentheses.
- pointer:
- ``Cray pointer'' syntax.
- quad-constant:
- Quad precision real constants, e.g.
of the form 1.23Q4 .
- quotemark:
- Strings delimited by quote marks rather
than apostrophes.
- statement-order
- Statements out of the sequence mandated
by the Standard. The allowed sequence is illustrated in Table 1 in the
section on Interpreting the Output.
- typeless-constant:
- Typeless constants,
for example Z'19AF' .
- type-size:
- Type declarations specifying a size, for
example REAL*8 .
- variable-format:
- Variable repeat specification or field
size in FORMAT. These are of the form < expr > .
- vms-io:
- The following
VMS Fortran keywords used in I/O statements:
BLOCKSIZE | EXTENDSIZE
| READONLY |
BUFFERCOUNT | INITIALSIZE | RECORDSIZE |
CARRIAGECONTROL
| MAXREC | RECORDTYPE |
DEFAULTFILE | NAME (in OPEN ) | SHARED |
DISP
| NOSPANBLOCK | TYPE |
DISPOSE | ORGANIZATION |
The keyword NAME
is standard only in the INQUIRE statement.
See also: -f90 , -f95 , -portability
, -pretty , -wordsize .
Next: -f90