Table of Contents

Previous: -f77

Option: f90

This setting provides detailed control over the warnings about supported extensions to the Fortran 77 Standard that were not adopted as part of the Fortran 90 Standard. Note that ftnchek does not support the full Fortran 90 language. However, it does support some common extensions to Fortran 77 that were prevalent before Fortran 90 was defined. Some of these extensions became part of the Fortran 90 Standard, but others did not. The -f90 setting warns only about the latter. That is, this flag covers things that are neither legal Fortran 77 nor legal Fortran 90. Therefore, the warnings controlled by this flag are basically a subset of the warnings controlled by -f77. There are a few cases, described below, where the circumstances in which the warning is given are slightly different for the two flags.

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, -f90 is equivalent to -f90=all, and -nof90 is equivalent to -f90=none.

The following keywords have identical meanings for -f90 as for -f77. The reader is referred to the explanations under -f77.


The keywords which differ somewhat from the corresponding -f77 keywords are as follows.

The limit on the number of continuation lines for a statement in fixed source form is the same, namely 19, in Fortran 90 as in Fortran 77. For free source form the limit is 39 continuation lines, and a line containing a continuation mark cannot be otherwise empty or contain only a comment.
This is the same as for -f77 except for the intrinsic functions defined in MIL-STD 1753, which are all included in Fortran 90, and so are not warned about. (See -intrinsic for a list.)
This is the same as for -f77 except that no warnings are given for the I/O keywords that are standard in Fortran 90.
Although the Fortran 90 Standard allows lines longer than 72 characters in free source form, this restriction still applies to fixed source form. In free source form the line length limit is 132 characters, and unlike fixed form, ftnchek does not allow this limit to be increased.
This is the same as for -f77 except for expressions mixing extended precision real with complex data types, which are permitted in Fortran 90.
This is similar to the corresponding -f77 warning, but applies the somewhat looser restrictions on statement order of the Fortran 90 Standard. In particular, Fortran 90 allows DATA statements and statement-function definitions to be intermixed with specification statements.
In Fortran 90, binary, octal, and hexadecimal constants of the form B'ddd', O'ddd', and Z'ddd', respectively, are permitted. Here 'ddd' represents a string of digits. ftnchek recognizes these forms, as well as a variant of the form X'ddd' for a hexadecimal constant, and other variants in which the base indicator B, O, Z, or X follows the digit string. These variants were not adopted in Fortran 90, so only they are warned about when this flag is turned on.

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

Next: -f95