The /E option preprocesses the C source file and copies preprocessor output to the standard output device (usually your terminal). The /E option adds #line directives to the output. The #line directives are placed at the beginning and end of each included file and around lines removed by preprocessor directives that specify conditional compilation. You can use the /EP option, discussed below, to suppress the addition of #line to the output.
The output that the /E option generates is identical to the original source file except that all preprocessor directives are carried out, macro expansions are performed, and comments are removed. You usually use the /E option with the /C option (see “/c (Compile Without Linking)”), which preserves comments in the preprocessed output. You can use DOS redirection to save the output in a disk file.
Use this option when you want to resubmit the preprocessed listing for compilation. The #line directives renumber the lines of the preprocessed file so that errors generated during later stages of processing refer to the line numbers of the original source file rather than to the preprocessed file.
The /E option suppresses compilation. It also suppresses production of the alternate output files that the /Fa, /Fc, /Fm, or /Fo options generate.
Example
CL /E /C ADD.C > PREADD.C
This command creates a preprocessed file with inserted #line directives from the source file ADD.C. The output is redirected to the file PREADD.C.
Note:
Precompiled headers do not work with the /E option.