-P

Category

Output control

Pragma equivalent

None.

Purpose

Preprocesses the source files named in the compiler invocation, without compiling, and creates an output preprocessed file for each input file.

The preprocessed output file has the same name as the input file but with a .i suffix.

Syntax

Read syntax diagramSkip visual syntax diagram
>>- -P---------------------------------------------------------><

Defaults

By default, source files are preprocessed, compiled, and linked to produce an executable file.

Usage

Source files with unrecognized file name suffixes are preprocessed as C files except those with a .i suffix.

Unless -qppline is specified, #line directives are not generated.

Line continuation sequences are removed and the source lines are concatenated.

The -P option retains all white space including line-feed characters, with the following exceptions:

The -P option is overridden by the -E option. The -P option overrides the -c, -o, and -qsyntaxonly option.

Predefined macros

None.

Related information