/EP (Preprocess to stdout Without #line Directives)
This option preprocesses C and C++ source files and copies the preprocessed files to the standard output device. In the process, all preprocessor directives are carried out, macro expansions are performed, and comments are removed. To preserve comments in the preprocessed output, use the /C option along with /EP.
Errors generated during later stages of processing refer to the line numbers of the preprocessed file rather than the original source file. If you want line numbers to refer to the original source file, use /E instead. The /E option adds #line directives to the output for this purpose.
To send the preprocessed output, with #line directives, to a file, use the /P option instead.
To send the preprocessed output to stdout, with #line directives, use /P and /EP together.
You cannot use precompiled headers with the /EP option.
To set this compiler option in the Visual Studio development environment
- Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
- Click the C/C++ folder.
- Click the Preprocessor property page.
- Modify the Generate Preprocessed File property.
To set this compiler option programmatically
The following command line preprocesses file
ADD.C, preserves comments, and displays the result on the standard output device:
CL /EP /C ADD.C