Preprocessing Operations

Preprocessing carries out the following operations on your program source files:

  1. New-line characters are introduced as needed to replace system-dependent end-of-line characters, and other system-dependent character-set translations are performed as needed. Trigraph sequences are replaced by equivalent single characters.
  2. Each \ (backslash) followed by a new-line character is deleted, and the next source line is appended to the line that contained the backslash.
  3. The source text is decomposed into preprocessing tokens tokens and sequences of white space. A single white space replaces each comment. A source file cannot end with a partial token or comment.
  4. Preprocessing directives are run, and macros are expanded.
  5. Escape sequences in character constants and string literals are replaced by their equivalent values.
  6. 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
Preprocessor Macros
Conditional Compilation Directives


Source Program Character Set