SLAU132V October   2004  – February 2020

 

  1.   1
    1.     2
    2.     3
    3.     4
    4.     5
    5.     6
  2.   7
    1.     8
    2.     9
    3.     10
    4.     11
    5.     12
  3.   13
    1.     14
    2.     15
    3.     16
      1.      17
      2.      18
      3.      19
      4.      20
      5.      21
      6.      22
      7.      23
      8.      24
      9.      25
      10.      26
      11.      27
      12.      28
    4.     29
      1.      30
      2.      31
    5.     32
      1.      33
      2.      34
        1.       35
      3.      36
      4.      37
      5.      38
      6.      39
      7.      40
      8.      41
      9.      42
      10.      43
    6.     44
    7.     45
      1.      46
      2.      47
    8.     48
    9.     49
    10.     50
    11.     51
      1.      52
      2.      53
    12.     54
      1.      55
    13.     56
    14.     57
  4.   58
    1.     59
    2.     60
    3.     61
      1.      62
    4.     63
      1.      64
      2.      65
    5.     66
    6.     67
      1.      68
      2.      69
    7.     70
      1.      71
        1.       72
        2.       73
        3.       74
        4.       75
        5.       76
        6.       77
        7.       78
        8.       79
      2.      80
      3.      81
      4.      82
    8.     83
      1.      84
        1.       85
        2.       86
      2.      87
        1.       88
        2.       89
        3.       90
    9.     91
    10.     92
    11.     93
      1.      94
      2.      95
    12.     96
    13.     97
      1.      98
      2.      99
      3.      100
      4.      101
      5.      102
      6.      103
      7.      104
      8.      105
      9.      106
      10.      107
      11.      108
      12.      109
      13.      110
  5.   111
    1.     112
      1.      113
      2.      114
      3.      115
    2.     116
      1.      117
      2.      118
    3.     119
      1.      120
        1.       121
          1.        122
        2.       123
        3.       124
      2.      125
      3.      126
      4.      127
      5.      128
      6.      129
      7.      130
      8.      131
      9.      132
        1.       133
  6.   134
    1.     135
      1.      136
    2.     137
    3.     138
    4.     139
    5.     140
    6.     141
      1.      142
    7.     143
    8.     144
      1.      145
      2.      146
      3.      147
        1.       148
        2.       149
      4.      150
        1.       151
    9.     152
    10.     153
    11.     154
    12.     155
      1.      156
      2.      157
      3.      158
      4.      159
      5.      160
      6.      161
        1.       162
        2.       163
        3.       164
        4.       165
      7.      166
      8.      167
        1.       168
        2.       169
        3.       170
      9.      171
      10.      172
      11.      173
      12.      174
      13.      175
      14.      176
      15.      177
      16.      178
      17.      179
      18.      180
      19.      181
      20.      182
      21.      183
      22.      184
      23.      185
      24.      186
      25.      187
      26.      188
      27.      189
      28.      190
      29.      191
      30.      192
        1.       193
        2.       194
        3.       195
      31.      196
      32.      197
    13.     198
    14.     199
    15.     200
    16.     201
      1.      202
      2.      203
      3.      204
    17.     205
      1.      206
      2.      207
      3.      208
      4.      209
      5.      210
    18.     211
  7.   212
    1.     213
      1.      214
      2.      215
      3.      216
      4.      217
      5.      218
      6.      219
    2.     220
      1.      221
        1.       222
        2.       223
        3.       224
        4.       225
      2.      226
    3.     227
    4.     228
      1.      229
      2.      230
      3.      231
    5.     232
    6.     233
      1.      234
      2.      235
        1.       236
        2.       237
      3.      238
        1.       239
          1.        240
          2.        241
        2.       242
          1.        243
          2.        244
      4.      245
      5.      246
    7.     247
      1.      248
      2.      249
      3.      250
      4.      251
      5.      252
    8.     253
      1.      254
      2.      255
      3.      256
      4.      257
        1.       258
          1.        259
        2.       260
          1.        261
    9.     262
      1.      263
      2.      264
      3.      265
        1.       266
        2.       267
        3.       268
        4.       269
          1.        270
          2.        271
          3.        272
          4.        273
        5.       274
        6.       275
      4.      276
        1.       277
        2.       278
    10.     279
  8.   280
    1.     281
      1.      282
      2.      283
      3.      284
      4.      285
      5.      286
      6.      287
      7.      288
      8.      289
    2.     290
      1.      291
        1.       292
      2.      293
      3.      294
      4.      295
        1.       296
      5.      297
        1.       298
    3.     299
    4.     300
      1.      301
      2.      302
        1.       303
        2.       304
          1.        305
          2.        306
          3.        307
          4.        308
      3.      309
        1.       310
        2.       311
  9.   312
    1.     313
    2.     314
      1.      315
      2.      316
      3.      317
  10.   318
    1.     319
  11.   320
    1.     321

Implementation-Defined Behavior

The C standard requires that conforming implementations provide documentation on how the compiler handles instances of implementation-defined behavior.

The TI compiler officially supports a freestanding environment. The C standard does not require a freestanding environment to supply every C feature; in particular the library need not be complete. However, the TI compiler strives to provide most features of a hosted environment.

The section numbers in the lists that follow correspond to section numbers in Appendix J of the C99 standard. The numbers in parentheses at the end of each item are sections in the C99 standard that discuss the topic. Certain items listed in Appendix J of the C99 standard have been omitted from this list.

J.3.1 Translation

  • The compiler and related tools emit diagnostic messages with several distinct formats. Diagnostic messages are emitted to stderr; any text on stderr may be assumed to be a diagnostic. If any errors are present, the tool will exit with an exit status indicating failure (non-zero). (3.10, 5.1.1.3)
  • Nonempty sequences of white-space characters are preserved and are not replaced by a single space character in translation phase 3. (5.1.1.2)

J.3.2 Environment

  • The compiler does not support multibyte characters in identifiers, string literals, or character constants. There is no mapping from multibyte characters to the source character set. However, the compiler accepts multibyte characters in comments. See Section 5.7 for details. (5.1.1.2)
  • The name of the function called at program startup is "main" (5.1.2.1)
  • Program termination does not affect the environment; there is no way to return an exit code to the environment. By default, the program is known to have halted when execution reaches the special C$$EXIT label. (5.1.2.1)
  • In relaxed ANSI mode, the compiler accepts "void main(void)" and "void main(int argc, char *argv[])" as alternate definitions of main. The alternate definitions are rejected in strict ANSI mode. (5.1.2.2.1)
  • If space is provided for program arguments at link time with the --args option and the program is run under a system that can populate the .args section (such as CCS), argv[0] will contain the filename of the executable, argv[1] through argv[argc-1] will contain the command-line arguments to the program, and argv[argc] will be NULL. Otherwise, the value of argv and argc are undefined. (5.1.2.2.1)
  • Interactive devices include stdin, stdout, and stderr (when attached to a system that honors CIO requests). Interactive devices are not limited to those output locations; the program may access hardware peripherals that interact with the external state. (5.1.2.3)
  • Signals are not supported. The function signal is not supported. (7.14) (7.14.1.1)
  • The library function getenv is implemented through the CIO interface. If the program is run under a system that supports CIO, the system performs getenv calls on the host system and passes the result back to the program. Otherwise the operation of getenv is undefined. No method of changing the environment from inside the target program is provided. (7.20.4.5)
  • The system function is not supported. (7.20.4.6).

J.3.3. Identifiers

  • The compiler does not support multibyte characters in identifiers. See Section 5.7 for details. (6.4.2)
  • The number of significant initial characters in an identifier is unlimited. (5.2.4.1, 6.4.2)

J.3.4 Characters

  • The number of bits in a byte (CHAR_BIT) is 8. See Section 5.6 for details about data types. (3.6)
  • The execution character set is the same as the basic execution character set: plain ASCII. (5.2.1)
  • The values produced for the standard alphabetic escape sequences are as follows: (5.2.2)
  • Escape Sequence ASCII Meaning Integer Value
    \a BEL (bell) 7
    \b BS (backspace) 8
    \f FF (form feed) 12
    \n LF (line feed) 10
    \r CR (carriage return) 13
    \t HT (horizontal tab) 9
    \v VT (vertical tab) 11
  • The value of a char object into which any character other than a member of the basic execution character set has been stored is the ASCII value of that character. (6.2.5)
  • Plain char is identical to unsigned char, but can be changed to signed char with the --plain_char=signed option. (6.2.5, 6.3.1.1)
  • The source character set and execution character set are both plain ASCII, so the mapping between them is one-to-one. The compiler accepts multibyte characters in comments. See Section 5.7 for details. (6.4.4.4, 5.1.1.2)
  • The compiler currently supports only one locale, "C". (6.4.4.4).
  • The compiler currently supports only one locale, "C". (6.4.5).

J.3.5 Integers

  • No extended integer types are provided. (6.2.5)
  • Negative values for signed integer types are represented as two's complement, and there are no trap representations. (6.2.6.2)
  • No extended integer types are provided, so there is no change to the integer ranks. (6.3.1.1)
  • When an integer is converted to a signed integer type which cannot represent the value, the value is truncated (without raising a signal) by discarding the bits which cannot be stored in the destination type; the lowest bits are not modified. (6.3.1.3)
  • Right shift of a signed integer value performs an arithmetic (signed) shift. The bitwise operations other than right shift operate on the bits in exactly the same way as on an unsigned value. That is, after the usual arithmetic conversions, the bitwise operation is performed without regard to the format of the integer type, in particular the sign bit. (6.5)

J.3.6 Floating point

  • The accuracy of floating-point operations (+ - * /) is bit-exact. The accuracy of library functions that return floating-point results is not specified. (5.2.4.2.2)
  • The compiler does not provide non-standard values for FLT_ROUNDS (5.2.4.2.2)
  • The compiler does not provide non-standard negative values of FLT_EVAL_METHOD (5.2.4.2.2)
  • The rounding direction when an integer is converted to a floating-point number is IEEE-754 "round to even". (6.3.1.4)
  • The rounding direction when a floating-point number is converted to a narrower floating-point number is IEEE-754 "round to even". (6.3.1.5)
  • For floating-point constants that are not exactly representable, the implementation uses the nearest representable value. (6.4.4.2)
  • The compiler does not contract float expressions. (6.5)
  • The default state for the FENV_ACCESS pragma is off. (7.6.1)
  • The TI compiler does not define any additional float exceptions (7.6, 7.12)
  • The default state for the FP_CONTRACT pragma is off. (7.12.2)
  • The "inexact" floating-point exception cannot be raised if the rounded result equals the mathematical result. (F.9)
  • The "underflow" and "inexact" floating-point exceptions cannot be raised if the result is tiny but not inexact. (F.9)

J.3.7 Arrays and pointers

  • When converting a pointer to an integer or vice versa, the pointer is considered an unsigned integer of the same size, and the normal integer conversion rules apply. Some pointers are not the same size as any integral type, but the conversion proceeds as if such a type did exist, with the rules implied by normal integer conversion.
  • When converting a pointer to an integer or vice versa, if the bitwise representation of the destination can hold all of the bits in the bitwise representation of the source, the bits are copied exactly. (6.3.2.3)
  • The size of the result of subtracting two pointers to elements of the same array is the size of ptrdiff_t, which is defined in Section 5.6. (6.5.6)

J.3.8 Hints

  • When the optimizer is used, the register storage-class specifier is ignored. When the optimizer is not used, the compiler will preferentially place register storage class objects into registers to the extent possible. The compiler reserves the right to place any register storage class object somewhere other than a register. (6.7.1)
  • The inline function specifier is ignored unless the optimizer is used. For other restrictions on inlining, see Section 2.11.2. (6.7.4)

J.3.9 Structures, unions, enumerations, and bit-fields

  • A "plain" int bit-field is treated as a signed int bit-field. (6.7.2, 6.7.2.1)
  • In addition to _Bool, signed int, and unsigned int, the compiler allows char, signed char, unsigned char, signed short, unsigned shot, signed long, unsigned long, signed long long, unsigned long long, and enum types as bit-field types. (6.7.2.1)
  • Bit-fields may not straddle a storage-unit boundary.(6.7.2.1)
  • Bit-fields are allocated in endianness order within a unit. (6.7.2.1)
  • Non-bit-field members of structures are aligned as specified in Section 6.2. (6.7.2.1)
  • The integer type underlying each enumerated type is described in Section 5.6.1. (6.7.2.2)

J.3.10 Qualifiers

  • The TI compiler does not shrink or grow volatile accesses. It is the user's responsibility to make sure the access size is appropriate for devices that only tolerate accesses of certain widths. The TI compiler does not change the number of accesses to a volatile variable unless absolutely necessary. This is significant for read-modify-write expressions such as += ; for an architecture which does not have a corresponding read-modify-write instruction, the compiler will be forced to use two accesses, one for the read and one for the write. Even for architectures with such instructions, it is not guaranteed that the compiler will be able to map such expressions to an instruction with a single memory operand. It is not guaranteed that the memory system will lock that memory location for the duration of the instruction. In a multi-core system, some other core may write the location after a RMW instruction reads it, but before it writes the result. The TI compiler will not reorder two volatile accesses, but it may reorder a volatile and a non-volatile access, so volatile cannot be used to create a critical section. Use some sort of lock if you need to create a critical section. (6.7.3)

J.3.11 Preprocessing directives

  • Include directives may have one of two forms, " " or < >. For both forms, the compiler will look for a real file on-disk by that name using the include file search path. See Section 2.5.2. (6.4.7).
  • The value of a character constant in a constant expression that controls conditional inclusion matches the value of the same character constant in the execution character set (both are ASCII). (6.10.1).
  • The compiler uses the file search path to search for an included < > delimited header file. See Section 2.5.2. (6.10.2).
  • he compiler uses the file search path to search for an included " " delimited header file. See Section 2.5.2. (6.10.2). (6.10.2).
  • There is no arbitrary nesting limit for #include processing. (6.10.2).
  • See Section 5.12 for a description of the recognized non-standard pragmas. (6.10.6).
  • The date and time of translation are always available from the host. (6.10.8).

J.3.12 Library functions

  • Almost all of the library functions required for a hosted implementation are provided by the TI library, with exceptions noted in Section 5.16.1. (5.1.2.1).
  • The format of the diagnostic printed by the assert macro is "Assertion failed, (assertion macro argument), file file, line line". (7.2.1.1).
  • No strings other than "C" and "" may be passed as the second argument to the setlocale function (7.11.1.1).
  • No signal handling is supported. (7.14.1.1).
  • The +INF, -INF, +inf, -inf, NAN, and nan styles can be used to print an infinity or NaN. (7.19.6.1, 7.24.2.1).
  • The output for %p conversion in the fprintf or fwprintf function is the same as %x of the appropriate size. (7.19.6.1, 7.24.2.1).
  • The termination status returned to the host environment by the abort, exit, or _Exit function is not returned to the host environment. (7.20.4.1, 7.20.4.3, 7.20.4.4).
  • The system function is not supported. (7.20.4.6).

J.3.13 Architecture

  • The values or expressions assigned to the macros specified in the headers float.h, limits.h, and stdint.h are described along with the sizes and format of integer types are described in Section 5.6. (5.2.4.2, 7.18.2, 7.18.3)
  • The number, order, and encoding of bytes in any object are described in Section 6.2.1. (6.2.6.1)
  • The value of the result of the sizeof operator is the storage size for each type, in terms of bytes. See Section 6.2. (6.5.3.4)