According to Section 1 of Annex J of the C standard [ISO/IEC 9899:19992011], the behavior a program is unspecified in the circumstances outlined the table below. The "Practice" column in the table identifies the coding practice(s) that address the specific case of unspecified behavior (USB).
USB | Description | Practice Practice | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
1
| The manner and timing of static initialization. |
| ||||||||||
2
| The termination status returned to the hosted environment if the return type of |
| ||||||||||
3
| The values of objects that are neither lock-free atomic objects nor of type volatile sig_atomic_t and the state of the floating-point environment when the processing of the abstract machine is interrupted by receipt of a signal. | |||||||||||
4
| The behavior of the display device if a printing character is written when the active position is at the final position of a line. |
| ||||||||||
5 4
| The behavior of the display device if a backspace character is written when the active position is at the initial position of a line. |
| ||||||||||
6 5
| The behavior of the display device if a horizontal tab character is written when the active position is at or past the last defined horizontal tabulation position. |
| ||||||||||
7 6
| The behavior of the display device if a vertical tab character is written when the active position is at or past the last defined vertical tabulation position. |
| ||||||||||
8 7
| How an extended source character that does not correspond to a universal character name counts toward the significant initial characters in an external identifier. |
| ||||||||||
9 8
| Many aspects of the representations of types. |
| ||||||||||
10 9
| The value of padding bytes when storing values in structures or unions. | |||||||||||
11 10
| The value of a union member values of bytes that correspond to union members other than the one last one stored into. |
| ||||||||||
12 11
| The representation used when storing a value in an object that has more than one object representation for that value. |
| ||||||||||
13 12
| The values of any padding bits in integer representations. |
| ||||||||||
14 13
| Whether certain operators can generate negative zeros and whether a negative zero becomes a normal zero when stored in an object. |
| ||||||||||
15 14
| Whether two string literals result in distinct arrays. |
| ||||||||||
16 15
| The order in which subexpressions are evaluated and the order in which side effects take place, except as specified for the function-call | |||||||||||
17 16
| The order in which the function designator, arguments, and subexpressions within the arguments are evaluated in a function call. |
| ||||||||||
18 17
| The order of side effects among compound literal initialization list expressions. |
| ||||||||||
19 18
| The order in which the operands of an assignment operator are evaluated. |
| ||||||||||
20 19
| The alignment of the addressable storage unit allocated to hold a bit-field. |
| ||||||||||
21 20
| Whether a call to an inline function uses the inline definition or the external definition of the function. |
| ||||||||||
22 21
| Whether or not a size expression is evaluated when it is part of the operand of a | |||||||||||
23 22
| The order in which any side effects occur among the initialization list expressions in an initializer. |
| ||||||||||
24 23
| The layout of storage for function parameters. |
| ||||||||||
25 24
| When a fully expanded macro replacement list contains a function-like macro name as its last preprocessing token and the next preprocessing token from the source file is a |
| ||||||||||
26 25
| The order in which | 26 | usb_26 | usb_26 | Whether||||||||
27
| The state of the floating-point status flags when execution passes from a part of the program translated with |
| ||||||||||
28
| The order in which |
| ||||||||||
29
| Whether | |||||||||||
30
| The results of the |
| ||||||||||
31
| The numeric result of the ilogb functions when the correct value is outside the range of the return type. | |||||||||||
32
| The result of rounding when the value is out of range. |
| ||||||||||
33
| The value stored by the remquo functions in the object pointed to by quo when y is zero. | |||||||||||
34
| Whether a comparison macro argument that is represented in a format wider than its semantic type is converted to the semantic type. | |||||||||||
35 32
| Whether | |||||||||||
36 33
| Whether | |||||||||||
37 34
| The hexadecimal digit before the decimal point when a non-normalized floating-point number is printed with an |
| ||||||||||
38 35
| The value of the file position indicator after a successful call to the |
| ||||||||||
39 36
| The details of the value stored by the |
| ||||||||||
40 37
| The details of the value returned by the |
| ||||||||||
41 38
| Whether the |
| ||||||||||
42 39
| The order and contiguity of storage allocated by successive calls to the |
| ||||||||||
43 40
| The amount of storage allocated by a successful call to the | |||||||||||
44
| Whether a call to the atexit function that does not happen before the exit function is called will succeed. | |||||||||||
45
| Whether a call to the at_quick_exit function that does not happen before the quick_exit function is called will succeed. | |||||||||||
46 41
| Which of two elements that compare as equal is matched by the |
| ||||||||||
47 42
| The order of two elements that compare as equal in an array sorted by the |
| ||||||||||
48 43
| The encoding of the calendar time returned by the | |||||||||||
49 44
| The characters stored by the |
| ||||||||||
50
| Whether an encoding error occurs if a wchar_t value that does not correspond to a member of the extended character set appears in the format string for a function in 7.29.2 or 7.29.5 and the specified semantics do not require that value to be processed by wcrtomb . | |||||||||||
51 45
| The conversion state after an encoding error occurs. |
| ||||||||||
52 46
| The resulting value when the "invalid" floating-point exception is raised during IEC 60559 floating to integer conversion. |
| ||||||||||
53 47
| Whether conversion of non-integer IEC 60559 floating values to integer raises the "inexact" floating-point exception. |
| ||||||||||
54
| Whether or when library functions in <math.h> raise the "inexact" floating-point exception in an IEC 60559 conformant implementation. | |||||||||||
55
| Whether or when library functions in <math.h> raise an undeserved "underflow" floating-point exception in an IEC 60559 conformant implementation. | |||||||||||
56 48
| The exponent value stored by |
| ||||||||||
57 49
| The numeric result returned by the |
| ||||||||||
58 50
| The sign of one part of the complex result of several math functions for certain exceptional values in IEC 60559 compatible implementations. |
|