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.
Currently, GNU cpp only supports character sets that are strict supersets of ASCII, and performs no translation of 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 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.
For a discussion on how the preprocessor locates header files, Include Operation.
#include
directive.
See Computed Includes.
#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.