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. (Further details about the extensions themselves are given below in the section on Extensions.) 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:

    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).
    attribute-based-decl:
      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 declared variables. 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.)
    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=unix-backslash setting is specified to cause the escape interpretation of backslash..
    byte:
      BYTE data type declaration.
    case-construct:
      The SELECT CASE construct.
    character:
      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-subprog-name:
      Common block and subprogram having the same name.
    construct-name:
      Use of a construct-name to label a control statement.
    continuation:
      More than 19 successive continuation lines.
    cpp:
      Unix C preprocessor directives in the source code.
    cray-pointer:
      ``Cray pointer'' syntax.
    cycle-exit:
      The CYCLE and EXIT statements.
    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=dec-tab setting 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.
    io-keywords
      Nonstandard keywords used in I/O statements. These fall into three groups. The first group includes keywords that are accepted in Fortran 90:

      ACTION | PAD | READWRITE
      ADVANCE | POSITION | SIZE
      DELIM | READ | WRITE
      EOR |  |

      The second group comprises the following VMS Fortran keywords:

      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.) The third group consists of the following IBM/MVS keyword:

      NUM |  |

      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.
    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=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 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.
    param-intrinsic:
      Intrinsic function or exponentiation by a real used to define the value of a PARAMETER definition.
    param-noparen:
      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.)
    pointer:
      Fortran 90 standard pointer-related syntax, including POINTER, TARGET and ALLOCATABLE type declarations, ALLOCATE, DEALLOCATE, and NULLIFY statements, and pointer assignment using =>.
    quad-constant:
      Quad precision real constants, e.g. of the form 1.23Q4.
    quotemark:
      Strings delimited by quote marks rather than apostrophes.
    relops:
      Relational (comparison) operators composed of punctuation, namely: < <= == /= > >=.
    semicolon:
      Semicolon used as statement separator.
    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:
      Obsolete. Now has the same meaning as the io-keywords keyword.

    See also: -f90, -f95, -portability, -pretty, -style, -wordsize.

  Next: -f90