[Main]
Title=Implementation-defined Behavior

[Top]
This is how CPP behaves in all the cases which the C standard
describes as <U>implementation-defined</U>.  This term means that the
implementation is free to do what it likes, but must document its choice
and stick to it.
<UL>
<LI>
The mapping of physical source file multi-byte characters to the
execution character set.
<BR><BR>
Currently, GNU cpp only supports character sets that are strict supersets
of ASCII, and performs no translation of characters.
<BR><BR>
</LI>
<LI>
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.
<BR><BR>
</LI>
<LI>
The numeric value of character constants in preprocessor expressions.
The preprocessor and compiler interpret character constants in the
same way; i.e. escape sequences such as <CODE>\a</CODE> are given the
values they would have on the target machine.
<BR><BR>
The compiler values a multi-character character constant a character
at a time, shifting the previous value left by the number of bits per
target character, and then or-ing in the bit-pattern of the new
character truncated to the width of a target character.  The final
bit-pattern is given type <CODE>int</CODE>, and is therefore signed,
regardless of whether single characters are signed or not (a slight
change from versions 3.1 and earlier of GCC).  If there are more
characters in the constant than would fit in the target <CODE>int</CODE> the
compiler issues a warning, and the excess leading characters are
ignored.
<BR><BR>
For example, 'ab' for a target with an 8-bit <CODE>char</CODE> would be
interpreted as (int) ((unsigned char) 'a' * 256 + (unsigned char)
'b'), and '\234a' as (int) ((unsigned char) '\234' * 256 + (unsigned
char) 'a').
<BR><BR>
</LI>
<LI>
Source file inclusion.
For a discussion on how the preprocessor locates header files,
see <A HREF="$$LINK(SEC7)">Include Operation</A>.
<BR><BR>
</LI>
<LI>
Interpretation of the filename resulting from a macro-expanded
<CODE>#include</CODE> directive.
<BR><BR>
See <A HREF="$$LINK(SEC8a)">Computed Includes</A>.
<BR><BR>
</LI>
<LI>
Treatment of a <CODE>#pragma</CODE> directive that after macro-expansion
results in a standard pragma.
<BR><BR>
No macro expansion occurs on any <CODE>#pragma</CODE> directive line, so the
question does not arise.
<BR><BR>
Note that GCC does not yet implement any of the standard
pragmas.
</LI>
</UL>
