Search notes:

cl /P /E /EP (Preprocess only)

The Visual Compiler options /P, /E and /PE preprocesses a source file only (without compling it into an object file).
This can be demonstrated with the following simple source file (which is neither valid C nor C++ code):
Start
#define NUM 42
The number is NUM
#ifdef NUM
It is defined
#else
It is not defined
#endif
The end
Github repository about-cl, path: /options/E-P-EP/file.c

/P to preprocess into a file

cl /P file.c creates file.i with the following content:
#line 1 "file.c"
Start

The number is 42

It is defined


#line 9 "file.c"
The end

/E to preprocess to stdout

cl /E file.c prints the (same) preprocessed result to stdout.

/EP to omit the line directives

cl /EP file.c also writes the preprocessed result to stdout and it also removes the #line directives:
Start

The number is 42

It is defined



The end

See also

The equivalent gcc options -E and -P.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1759390379, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/development/Visual-Studio/cl/options/E-P-EP/index(84): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78