Preprocessing manipulates the text of a source file, usually as a first phase of translation that is initiated by a compiler invocation. Common tasks accomplished by preprocessing are macro substitution, testing for conditional compilation directives, and file inclusion.
You can invoke the preprocessor separately to process text without compiling. The output is an intermediate file, which can be input for subsequent translation. Preprocessing without compilation can be useful as a debugging aid because it provides a way to see the result of include directives, conditional compilation directives, and complex macro expansions.
| Option | Description |
|---|---|
| -E | Preprocesses the source files and writes the output to standard output. By default, #line directives are generated. |
| -P | Preprocesses the source files and creates an intermediary file with a .i file name suffix for each source file. By default, #line directives are not generated. |
| -qppline | Toggles on and off the generation of #line directives for the -E and -P options. |
| -C, -C! | Preserves comments in preprocessed output. |
| -D | Defines a macro name from the command line, as if in a #define directive. |
| -U | Undefines a macro name defined by the compiler or by the -D option. |
| -qshowmacros | Emits macro definitions to preprocessed output. |