/EP (Copy Preprocessor Output to Standard Output)

The /EP option is similar to the /E option: it preprocesses the C source file and copies preprocessor output to the standard output device. Unlike the /E option, however, the /EP option does not add #line directives to the output. You can use the /EP option with the /P option, discussed later in this chapter, to suppress adding #line directives to the output.

Preprocessed output is identical to the original source file except that all prepro-cessor directives are carried out, macro expansions are performed, and comments are removed. You can use the /EP option with the /C option (see “/c (Compile Without Linking)”), which preserves comments in the preprocessed output.

The /EP option suppresses compilation; CL does not produce an object file or a map file, even if you specify the /Fo or /Fm option on the CL command line. Also, it will not produce the output files specified by the /Fa or the /Fc options.

Example

CL /EP /C ADD.C

This command creates a preprocessed file from the source file ADD.C. It preserves comments but does not insert #line directives. The output appears on the screen.