Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Fortran Preprocessor Options

The Fortran preprocessor fpp can be invoked automatically or by specifying compiler option fpp.

The following preprocessor options are available if you use the fpp compiler option.

Linux and macOS

Preprocessor options must start with a dash (-); for example, -macro=no.

Windows

Preprocessor options must start with a slash (/); for example, /macro=no.

Preprocessor Option

Description

B

Specifies that C++-style comments should not be recognized.

C

Specifies that C-style comments should not be recognized. This is the same as specifying c_com=no.

c_com={yes|no}

Determines whether C-style comments are recognized. If you specify c_com=no or C, C-style comments are not recognized. By default, C-style comments are recognized; that is, c_com=yes.

Dname

Defines the preprocessor variable name as 1 (one). This is the same as if a Dname=1 option appeared on the fpp command line. This is also the same as specifying the following line in the source file processed by fpp:

#define name 1

Dname=val

Defines name as if by a #define directive. This is the same as specifying the following line in the source file processed by fpp:

#define name var

Dname=val will be ignored if there are any non-alphabetic, non-numeric characters in name.

The D option has lower precedence than the U option. That is, if the same name is used in both a U option and a D option, the name will be undefined regardless of the order of the options.

e

For fixed-format source files, tells the compiler to accept extended source lines, up to 132 characters long.

e80

For fixed-format source files, tells the compiler to accept extended source lines, up to 80 characters long.

f_com={yes|no}

Determines whether Fortran-style end-of-line comments are recognized or ignored by fpp. If you specify f_com=no, Fortran style end-of-line comments are processed as part of the preprocessor directive.

By default, Fortran style end-of-line comments are identified by fpp on preprocessor lines and are then ignored by fpp; that is, f_com=yes. For example:

#define max 100 ! max number
do i = 1, max + 1

If you specify f_com=yes, fpp will output the following:

do i = 1, 100 + 1

If you specify f_com=no, fpp will output the following:

do i = 1, 100 ! max number + 1

f77

Tells the compiler to assume FORTRAN 77 language input source.

f90

Tells the compiler to assume Fortran 90 language input source.

fixed

Tells the compiler to assume fixed format in the source file.

free

Tells the compiler to assume free format in the source file.

help

Displays information about fpp options.

Idir

Inserts directory dir into the search path for files with names not beginning with /.

The #include dir is inserted ahead of the standard list of include directories so that #include files with names enclosed in double-quotes (") are searched for first in the directory of the file with the #include line, then in directories named with I options, and lastly, in directories from the standard list.

For #include files with names enclosed in angle-brackets (< >), the directory of the file with the #include line is not searched.

M

Generates make dependencies.

m

Expands macros everywhere. This is the same as specifying macro=yes.

macro={yes|no_com|no}

Determines the behavior of macro expansion. If you specify macro=no_com, macro expansion is turned off in comments. If you specify macro=no, no macro expansion occurs anywhere. By default, macros are expanded everywhere; that is, macro=yes.

macro_expand={vc|cpp}

Determines the mode of macro expansion. If you specify macro_expand=vc, macros are expanded in Microsoft Visual C/C++ order. If you specify macro_expand=cpp, macros are expanded in GNU CPP order.

MF=file

Makes fpp append dependencies to file.

noB

Specifies that C++-style comments should be recognized.

noC

Specifies that C-style comments should be recognized. This is the same as c_com=yes.

noJ

Specifies that F90-style comments should be recognized in a #define line. This is the same as f_com=no.

no-fort-cont

Specifies that IDL-style format should be recognized. This option is only for the IDE.

Note that macro arguments in IDL may have a C-like continuation character \, which is different from the Fortran continuation character &. The fpp preprocessor should recognize the C-like continuation character and process some other non-Fortran tokens so that the IDL processor can recognize them.

P

Tells the compiler that line-numbering directives should not be added to the output file. This line-numbering directive appears as follows:

#line-number file-name

Uname

Removes any initial definition of name, where name is an fpp variable that is predefined on a particular preprocessor.

The following shows an example of symbols that may be predefined, depending upon the architecture of the system:

Operating System: __APPLE__, __unix, and __linux

Hardware: __i386, __x86_64

undef

Removes initial definitions for all predefined symbols.

V

Displays the fpp version number.

w[0]

Prevents warnings from being output. By default, warnings are output to standard error stream (stderr).

what

Displays detailed version information.

Xu

Converts uppercase letters to lowercase, except within character-string constants. The default is to leave the case as is.

Xw

Tells the compiler that in fixed-format source files, the blank or space symbol (" ") is insignificant. By default, the space symbol is the delimiter of tokens for this format.

Ydir

Adds directory dir to the end of the system include paths.