Characteristics of TMS320C2x/C2xx/C5x C Language
5-2
5.1 Characteristics of TMS320C2x/C2xx/C5x C Language
The ANSI standard identifies certain features of the C language that are
affected by characteristics of the target processor, run-time environment, or
host environment. For efficiency or practicality, these characteristics can differ
among standard compilers. This section describes how these characteristics
are implemented for the TMS320C2x/C2xx/C5x C compiler.
The following list identifies all such cases and describes the behavior of the
TMS320C2x/C2xx/C5x C compiler in each case. Each description also in-
cludes a reference to more information. Many of the references are to the for-
mal ANSI standard or to the second edition of
The C Programming Language
by Kernighan and Ritchie (K&R).
5.1.1 Identifiers and Constants
-
The first 100 characters of all identifiers are significant. Case is significant;
uppercase and lowercase characters are distinct for identifiers. These
characteristics apply to all identifiers, internal and external.
(ANSI 3.1.2, K&R A2.3)
-
The source (host) and execution (target) character sets are assumed to
be ASCII. There are no multibyte characters.
(ANSI 2.2.1, K&R A12.1)
-
Hex or octal escape sequences in character or string constants may have
values up to 32 bits.
(ANSI 3.1.3.4, K&R A2.5.2)
-
Character constants with multiple characters are encoded as the last
character in the sequence. For example,
’abc’ == ’c’
(ANSI 3.1.3.4, K&R A2.5.2)
5.1.2 Data Types
-
For information about the representation of data types, see section 5.2,
Data Types
(ANSI 3.1.2.5, K&R A4.2)
-
The type size_t, which is the result of the
sizeof
operator, is unsigned int.
(ANSI 3.3.3.4, K&R A7.4.8)
-
The type ptrdiff_t, which is the result of pointer subtraction, is int.
(ANSI 3.3.6, K&R A7.7)
5.1.3 Conversions
-
Float-to-integer conversions truncate toward zero.
(ANSI 3.2.1.3, K&R A6.3)
-
Pointers and integers can be freely converted.
(ANSI 3.3.4, K&R A6.6)
Summary of Contents for TMS320C2x
Page 8: ...viii...
Page 69: ...2 47 C Compiler Description...
Page 159: ...6 36...
Page 226: ...8 6...