Phases of Preprocessing
Preprocessing appears as if it occurs in several phases.
- New-line characters are introduced as needed to replace
system-dependent end-of-line indicators, and any other
system-dependent character-set translations are done.
Equivalent single characters replace trigraph sequences.
Universal-character-names replace characters not in the
basic source character set.
- Each \ (backslash) followed by a new-line character pair
is deleted. The next source line is appended to the line
that contained the sequence.
- The source text is decomposed into preprocessing tokens
and sequences of white space. A single white space
replaces each comment. A source file cannot end with a
partial token or comment.
- Preprocessing directives are executed, and macros are
expanded.
- Escape sequences or
universal-character-names in character constants and
string literals are replaced by their equivalent values.
- Adjacent string literals are concatenated.
The rest of the compilation process operates on the
preprocessor output, which is syntactically and semantically
analyzed and translated, and then linked as necessary with other
programs and libraries.

Preprocessor Directives - An
Overview