Download ARM Instruction Set
Transcript
C Compiler 2.8 Implementation Details This section gives details of those aspects of the compiler and C library which the ANSI standard for C identifies as implementation-defined, together with other points of interest to programmers. 2.8.1 Character sets and identifiers An identifier can be of any length. The compiler truncates an identifier after 256 characters, all of which are significant (the standard requires a minimum of 31 significant characters). The source character set expected by the compiler is 7-bit ASCII. Within comments, string literals, and character constants, the full ISO 8859-1 (Latin 1) 8-bit character set is recognised. In its generic configuration, as delivered, the C library processes the full ISO 8859-1 (Latin-1) 8-bit character set, except that the default locale is the C locale (see ➲Standard Implementation Definition on page 2-24). The ctype functions therefore all return 0 when applied to codes in the range 160 to 255. Calling setlocale(LC_CTYPE, "ISO8859-1") makes the isupper and islower functions behave as expected over the full 8-bit Latin-1 alphabet, rather than over the 7-bit ASCII subset. Upper and lower case characters are distinct in all internal and external identifiers. In pcc mode (-pcc option) and “limited pcc” or “system programming” mode (-fc option), an identifier may also contain a dollar character. 2.8.2 Data Elements Type Size in bits Type Size in bits char 8 float 32 short 16 double 64 int 32 long double 64 (subject to change) long 32 all pointers 32 Table 2-1: Size of data elements Integers are represented in two’s complement form. Data items of type char are unsigned by default, though in ANSI mode they may be explicitly declared as signed char or unsigned char. In the compiler’s pcc mode there is no signed keyword, so chars are signed by default and may be declared unsigned if required. Reference Manual ARM DUI 0020D 2-17