Table of Contents

Previous: -pointersize


Option: portability

-portability=list
ftnchek will give warnings for a variety of non-portable usages. Examples include the use of tabs except in comments or inside strings, the use of Hollerith constants, and the equivalencing of variables of different data types. This option does not produce warnings for supported extensions to the Fortran 77 Standard, which may also cause portability problems. To catch those, use the -f77 setting. By default, all warnings are turned off.

This setting provides detailed control over the warnings about possible portability problems. The list consists of keywords separated by commas or colons. There are three special keywords: all to turn on all the warnings about nonportable usages, 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, -portability is equivalent to -portability=all , and -noportability is equivalent to -portability=none . The warning keywords with their meanings are as follows:

backslash:
Backslash character in strings. Since some compilers treat the backslash as an escape character, its presence can cause problems even though it is used in a standard-conforming way.
common-alignment:
COMMON block variables not in descending order of storage size. Some compilers require this ordering because of storage alignment requirements.
hollerith:
Hollerith constants (other than within FORMAT specifications). The Hollerith data type is a feature of Fortran IV that has been deleted in the Fortran 77 standard. It is superseded by the character data type. Storing Hollerith data in variables of a numeric or logical data type is nonportable due to differing word sizes.
long-string:
String constants, variables, or expressions over 255 chars long.
mixed-equivalence:
Variables of different data types equivalenced.
mixed-size:
Variables declared with default precision used with variables given explicit precision, in expressions, assignments, or as arguments. For example, if a variable declared as REAL*8 is treated as equivalent to DOUBLE PRECISION .
real-do:
Non-integer DO loop index and bounds. These can cause a program's results to depend on the hardware characteristics of the particular computer used.
param-implicit-type:
Implicit typing of a parameter by the data type of the value assigned, if it differs from the default type. 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 and where the implicit type is different from the default type based on the first letter of the parameter name, will be warned about. Implicit parameter typing can change the semantics of statements where the parameter is used, causing portability problems.
tab:
Tabs in source code. Tabs are interpreted differently by different compilers. This warning will be given only once, at the end of the file.

See also: -f77 , -f90 , -f95 , -pretty , -wordsize .


Next: -pretty