Next:Implementation limits, Up:Implementation Details [Contents][Index]
This is how CPP behaves in all the cases which the C standarddescribes asimplementation-defined. This term means that theimplementation is free to do what it likes, but must document its choiceand stick to it.
The input character set can be specified using the-finput-charset option, while the execution character set maybe controlled using the-fexec-charset and-fwide-exec-charset options.
The C and C++ standards allow identifiers to be composed of ‘_’and the alphanumeric characters. C++ also allows universal characternames. C99 and later C standards permit both universal characternames and implementation-defined characters. In both C and C++ modes,GCC accepts in identifiers exactly those extended characters thatcorrespond to universal character names permitted by the chosenstandard.
GCC allows the ‘$’ character in identifiers as an extension formost targets. This is true regardless of thestd= switch,since this extension cannot conflict with standards-conformingprograms. When preprocessing assembler, however, dollars are notidentifier characters by default.
Currently the targets that by default do not permit ‘$’ are AVR,IP2K, MMIX, MIPS Irix 3, ARM aout, and PowerPC targets for the AIXoperating system.
You can override the default with-fdollars-in-identifiers or-fno-dollars-in-identifiers. Seefdollars-in-identifiers.
In textual output, each whitespace sequence is collapsed to a singlespace. For aesthetic reasons, the first token on each non-directiveline of output is preceded with sufficient spaces that it appears in thesame column as it did in the original source file.
The preprocessor and compiler interpret character constants in thesame way; i.e. escape sequences such as ‘\a’ are given thevalues they would have on the target machine.
The compiler evaluates a multi-character character constant a characterat a time, shifting the previous value left by the number of bits pertarget character, and then or-ing in the bit-pattern of the newcharacter truncated to the width of a target character. The finalbit-pattern is given typeint, and is therefore signed,regardless of whether single characters are signed or not.If there are morecharacters in the constant than would fit in the targetint thecompiler issues a warning, and the excess leading characters areignored.
For example,'ab' for a target with an 8-bitchar would beinterpreted as ‘(int) ((unsigned char) 'a' * 256 + (unsigned char) 'b')’, and'\234a' as ‘(int) ((unsigned char) '\234' * 256 + (unsigned char) 'a')’.
For a discussion on how the preprocessor locates header files,Include Operation.
No macro expansion occurs on any ‘#pragma’ directive line, so thequestion does not arise.
Note that GCC does not yet implement any of the standardpragmas.
Next:Implementation limits, Up:Implementation Details [Contents][Index]