Passing Fortran files through the C preprocessor
A common programming practice is to pass files through the C preprocessor
(cpp). cpp can include or omit lines from the
output file based on user-specified conditions (conditional compilation
). It can also perform
string substitution (macro expansion
).
IBM® Open XL Fortran can use cpp to preprocess a file before compiling it.
To call cpp for a particular file, use a file suffix of .F, .F77, .F90, .F95, .F03, or .F08 . Such file is preprocessed into an intermediate file. You can save the intermediate file by specifying the -d compiler option; otherwise, the file is deleted. If you specify the -d option, the intermediate file name is Ffilename.f*. Otherwise, the intermediate file name is /tmpdir/F8xxxxxx, where x is an alphanumeric character and tmpdir is the contents of the TMPDIR environment variable or, if you have not specified a value for TMPDIR, /tmp. If you only want to preprocess and do not want to produce object or executable files, specify the -qnoobject option also.
When IBM Open XL Fortran uses cpp for a file, the preprocessor will emit #line directives unless you also specify the -d option. The #line directive associates code that is created by cpp or any other Fortran source code generator with input code that you create. The preprocessor may cause lines of code to be inserted or deleted. Therefore, the #line directives that it emits can be useful in error reporting and debugging, because they identify the source statements found in the preprocessed code by listing the line numbers that were used in the original source.
To customize cpp preprocessing, the configuration file accepts the attributes cpp, cppsuffix, and cppoptions.
The letter F denotes the C preprocessor with the -t and -W options.