Many Fortran compilers including GNU Fortran allow passing the source code
through a C preprocessor (CPP; sometimes also called the Fortran preprocessor,
FPP) to allow for conditional compilation. In the case of GNU Fortran,
this is the GNU C Preprocessor in the traditional mode. On systems with
case-preserving file names, the preprocessor is automatically invoked if the
file extension is
.F03; otherwise use for fixed-format code the option
-x f77-cpp-input and for free-format code
Invocation of the preprocessor can be suppressed using
-x f77 or
If the GNU Fortran invoked the preprocessor,
is defined and
__GNUC_PATCHLEVEL__ can be used to determine the version of the
compiler. See Overview for details.
While CPP is the de-facto standard for preprocessing Fortran code, Part 3 of the Fortran 95 standard (ISO/IEC 1539-3:1998) defines Conditional Compilation, which is not widely used and not directly supported by the GNU Fortran compiler. You can use the program coco to preprocess such files (http://users.erols.com/dnagle/coco.html).