cpp.info: Implementation-defined behavior

Go forward to Implementation limits
Go up to Implementation Details
Go to the top op cpp

Implementation-defined behavior

   This is how GNU CPP behaves in all the cases which the C standard
describes as "implementation-defined".  This term means that the
implementation is free to do what it likes, but must document its choice
and stick to it.
   * The mapping of physical source file multi-byte characters to the
     execution character set.
     Currently, GNU cpp only supports character sets that are strict
     supersets of ASCII, and performs no translation of characters.
   * Non-empty sequences of whitespace characters.
     In textual output, each whitespace sequence is collapsed to a
     single space.  For aesthetic reasons, the first token on each
     non-directive line of output is preceded with sufficient spaces
     that it appears in the same column as it did in the original
     source file.
   * The numeric value of character constants in preprocessor
     The preprocessor and compiler interpret character constants in the
     same way; escape sequences such as `\a' are given the values they
     would have on the target machine.
     Multi-character character constants are interpreted a character at
     a time, shifting the previous result left by the number of bits per
     character on the host, and adding the new character.  For example,
     'ab' on an 8-bit host would be interpreted as 'a' * 256 + 'b'.  If
     there are more characters in the constant than can fit in the
     widest native integer type on the host, usually a `long', the
     excess characters are ignored and a diagnostic is given.
   * Source file inclusion.
     For a discussion on how the preprocessor locates header files,
     *Note Include Operation::.
   * Interpretation of the filename resulting from a macro-expanded
     `#include' directive.
     *Note Computed Includes::.
   * Treatment of a `#pragma' directive that after macro-expansion
     results in a standard pragma.
     No macro expansion occurs on any `#pragma' directive line, so the
     question does not arise.
     Note that GCC does not yet implement any of the standard pragmas.