/EP   (Preprocess to stdout Without #line Directives)

HomeOverviewHow Do ICompiler Options

The /EP option is similar to the /E option. It preprocesses C and C++ source files and copies the preprocessed file to the standard output device. The output is identical to the original source file, except that all preprocessor directives are carried out, macro expansions are performed, and comments are removed. You can use the /C option with /EP to preserve comments in the preprocessed output. Unlike /E, however, /EP does not add #line directives to the output.

The /EP option suppresses compilation. It also suppresses the output files from the /FA, /Fa, and /Fm options.

The following table summarizes the actions of the /E, /EP, and /P options.

Option Preprocessor output
includes #line directives?
Output sent to
/E Yes stdout
/P Yes .i file
/EP No stdout
/E  /EP No stdout
/P  /EP No .i file

Example

The following command creates a preprocessed file from the source file ADD.C. It preserves comments, but does not insert #line directives. The output is displayed:

CL /EP /C ADD.C