Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Wiki MarkupAccording to Section 2 of Annex J of \[[to the C Standard, Annex J, J.2 [ISO/IEC 9899:1999|AA. C References#ISO/IEC 9899-1999]\], the behavior a program is [undefined | BB. Definitions#undefined behavior] in the circumstances outlined the table below. The "Guidelines" column in the table identifies the guideline(s) that address the specific case of undefined behavior (UB). The parenthesized section numbers refers to the section of the C99 standard that identifies the undefined behavior.2024], the behavior of a program is undefined in the circumstances outlined in the following table. The "Guideline" column in the table identifies the coding practices that address the specific case of undefined behavior (UB). The descriptions of undefined behaviors in the "Description" column are direct quotes from the standard. The parenthesized numbers refer to the subclause of the C Standard (C23) that identifies the undefined behavior. 

UB

Class

Description

Guideline

UB

Description

Guidelines

1

Anchor
ub_1
ub_1

(error)

A "shall" or "shall not" requirement that appears outside of a constraint is violated (clause 4).

MSC15-C

2

Anchor
ub_2
ub_2

(warning)

A nonempty source file does not end in a new-line character which is not immediately preceded by a backslash character or ends in a partial preprocessing token or comment (5.1.1.2).

 


3

Anchor
ub_3
ub_3

(warning)

Token concatenation produces a character sequence matching the syntax of a universal character name (5.1.1.2).

PRE30-C

4

Anchor
ub_4
ub_4

(warning)

A program in a hosted environment does not define a function named main using one of the specified forms (5.1.2.3.2

.1

).

 

6


5
Anchor
ub_5
ub_5

The execution of a program contains a data race (5.1.2.5).

Anchor
ub_6
ub_6

(warning)

A character not in the basic source character set is encountered in a source file, except in an identifier, a character constant, a string literal, a header name, a comment, or a preprocessing token that is never converted to a token (5.2.1).

 


Anchor
ub_

6

7
ub_

6

7

(warning)

An identifier, comment, string literal, character constant, or header name contains an invalid multibyte character or does not begin and end in the initial shift state (5.2.

1. 7

2).

 


8

Anchor
ub_

7

8
ub_

7

8

(warning)

The same identifier has both internal and external linkage in the same translation unit (6.2.2).

DCL36-C

8

Anchor
ub_

8

9
ub_

8

9

(error)

An object is referred to outside of its lifetime (6.2.4).

DCL21-C, DCL30-C

9

10 

Anchor
ub_

9

10
ub_

9

10

(error)

The value of a pointer to an object whose lifetime has ended is used (6.2.4).

DCL30-C, EXP33-C

10

11

Anchor
ub_

10

11
ub_

10

11

(warning)

The value of an object with automatic storage duration is used while

it is indeterminate

the object has an indeterminate representation (6.2.4, 6.7.

8

11, 6.8).

EXP33-C, MSC22-C

11

12

Anchor
ub_

11

12
ub_

11

12

(warning)

A

trap

non-value representation is read by an lvalue expression that does not have character type (6.2.6.1).

EXP33-C

12

13

Anchor
ub_

12

13
ub_

12

13

(warning)

A

trap

non-value representation is produced by a side effect that modifies any part of the

object using 13

object using an lvalue expression that does not have character type (6.2.6.1).

 


14

Anchor
ub_

13

14
ub_

13 The arguments to certain operators are such that could produce a negative zero result, but the implementation does not support negative zeros

14

(warning)

Two declarations of the same object or function specify types that are not compatible (6.2.

6.2 14

7).

 

DCL23-C,
DCL40-C

15

Anchor
ub_

14

15
ub_

14 Two declarations of the same object or function specify types that are not compatible 15

15


A program requires the formation of a composite type from a variable length array type whose size is specified by an expression that is not evaluated (6.2.7).

DCL32-C


16
Anchor
ub_
15
16
ub_
15
16

(warning)

Conversion to or from an integer type produces a value outside the range that can be represented (6.3.1.4).

FLP34-C

16

17

Anchor
ub_

16

17
ub_

16

17

(warning)

Demotion of one real floating type to another produces a value outside the range that can be represented (6.3.1.5).

FLP34-C

17

18

Anchor
ub_

17

18
ub_

17 18

18

(error)

An lvalue does not designate an object when evaluated (6.3.2.1).

 


19

Anchor
ub_

18

19
ub_

18 19

19

(warning)

A non-array lvalue with an incomplete type is used in a context that requires the value of the designated object (6.3.2.1).

 


20 

Anchor
ub_20
ub_20


An lvalue designation an object of automatic storage duration that could have been declared with the register storage class is used in a context that requires the value of the designated object, but the object is uninitialized (6.3.2.1).
21
Anchor
ub_
19
21
ub_
19
21

(warning)

An lvalue having array type is converted to a pointer to the initial element of the array, and the array object has register storage class (6.3.2.1).

 


22 

20

Anchor
ub_

20

22
ub_

20 21

22

(warning)

An attempt is made to use the value of a void expression, or an implicit or explicit conversion (except to void) is applied to a void expression (6.3.2.2).

 


23 

Anchor
ub_

21

23
ub_

21

23

(warning)

Conversion of a pointer to an integer type produces a value outside the range that can be represented (6.3.2.3).

INT11

INT36-C

22

24 

Anchor
ub_

22

24
ub_

22

24

(warning)

Conversion between two pointer types produces a result that is incorrectly aligned (6.3.2.3).

EXP36-C

23

25

Anchor
ub_

23

25
ub_

23

25

(error)

A pointer is used to call a function whose type is not compatible with the

pointed-to type

referenced type (6.3.2.3).

 
EXP37-C
24

26 

Anchor
ub_

24

26
ub_

24

26

(warning)

An unmatched ' or " character is encountered on a logical source line during tokenization (6.4).

 


27 

25

Anchor
ub_

25

27
ub_

25

27

(warning)

A reserved keyword token is used in translation phase 7 or 8

for 26

(5.1.1.2) for some purpose other than as a keyword (6.4.1).

 


28 

Anchor
ub_

26

28
ub_

26 27

28

(warning)

A universal character name in an identifier does not designate a character whose encoding falls into one of the specified ranges (6.4.2.1).

 


29 

Anchor
ub_

27

29
ub_

27

29

(warning)

The initial character of an identifier is a universal character name designating a digit (6.4.2.1).

 


30 

28

Anchor
ub_

28

30
ub_

28

30

(warning)

Two identifiers differ only in nonsignificant characters (6.4.2.1).

DCL32

DCL23-C,
DCL31-C

29

31 

Anchor
ub_

29

31
ub_

29

31

(warning)

The identifier __func__

is

 is explicitly declared (6.4.2.2).

 


32 

30

Anchor
ub_

30

32
ub_

30

32

(info)

The program attempts to modify a string literal (6.4.5).

STR30-C

31

33 

Anchor
ub_

31

33
ub_

31

33

(warning)

The characters ', back-slash, ", /, or /* occur in the sequence between the < and > delimiters, or the characters ', back-slash, //, or /* occur in the sequence between the " delimiters, in a header name preprocessing token (6.4.7).

 

EXP39-C

32

34 

Anchor
ub_

32

34
ub_

32 Between two sequence points, an object is modified more than once, or is modified and the prior value is read other than to determine the value to be stored

34

(warning)

A side effect on a scalar object is unsequenced relative to either a different side effect on the same scalar object or a value computation using the value of the same scalar object (6.5.1).

 

EXP30-C

33

35 

Anchor
ub_

33

35
ub_

33

35

(warning)

An exceptional condition occurs during the evaluation of an expression (6.5.1).

 

INT32-C

34

36 

Anchor
ub_

34

36
ub_

34

36

(warning)

An object has its stored value accessed other than by an lvalue of an allowable type (6.5.1).

EXP39

DCL40-C,

35

EXP39-C

37 

Anchor
ub_

35

37
ub_

35 An attempt is made to modify the result of a function call, a conditional operator, an assignment operator, or a comma operator, or to access it after the next sequence point 36

37

(warning)

A function is defined with a type that is not compatible with the type (of the expression) pointed to by the expression that denotes the called function (6.5.

2.2, 6.5.15, 6.5.16, 6.5.17).

EXP35-C

3.3).

DCL40-C,
EXP37-C

38

Anchor
ub_

36

38
ub_

36 For a call to a function without a function prototype in scope, the number of arguments does not equal the number of parameters

38


A member of an atomic structure or union is accessed (6.5.
2
3.
2
4).
  39

39 

37

Anchor
ub_

37

39
ub_

37 For call to a function without a function prototype in scope where the function is defined with a function prototype, either the prototype ends with an ellipsis or the types of the arguments after promotion are not compatible with the types of the parameters

39

(error)

The operand of the unary * operator has an invalid value (6.5.

2

4.2).

 

EXP34-C

38

40 

Anchor
ub_

38

40
ub_

38

For a call to a function without a function prototype in scope where the function is not defined with a function prototype, the types of the arguments after promotion are not compatible with those of the parameters after promotion (with certain exceptions) (6.5.2.2).

 

40

(warning)

A pointer is converted to other than an integer or pointer type (6.5.5).


41 

Anchor
ub_41
ub_41

(warning)

The value of the second operand of the / or % operator is zero (6.5.6).

INT33-C

42

Anchor
ub_

39

42
ub_

39 A function is defined with a type that is not compatible with the type (of the expression) pointed to by the expression that denotes the called function

42


If the quotient a/b is not representable, the behavior of both a/b and a%b (6.5.

2.2 40

6).

 


43

Anchor
ub_

40

43
ub_

40 The operand of the unary * operator has an invalid value

43

(warning)

Addition or subtraction of a pointer into, or just beyond, an array object and an integer type produces a result that does not point into, or just beyond, the same array object (6.5.

3.2

7).

 

ARR30-C

41

44

Anchor
ub_

41

44
ub_

41 A pointer is converted to other than an integer or pointer type

44

(error)

Addition or subtraction of a pointer into, or just beyond, an array object and an integer type produces a result that points just beyond the array object and is used as the operand of a unary * operator that is evaluated (6.5.

4

7).

 

ARR30-C

42

45 

Anchor
ub_

42

45
ub_

42 The value of the second operand of the / or % operator is zero

45

(warning)

Pointers that do not point into, or just beyond, the same array object are subtracted (6.5.

5

7).

INT33

ARR36-C

43

46 

Anchor
ub_

43

46
ub_

43 Addition or subtraction of a pointer into, or just beyond, an array object and an integer type produces a result that does not point into, or just beyond, the same array object

46

(warning)

An array subscript is out of range, even if an object is apparently accessible with the given subscript (as in the lvalue expression a[1][7] given the declaration int a[4][5]) (6.5.

6 44

7).

ARR30-C

, ARR35-C , ARR38-C

47 

Anchor
ub_

44

47
ub_

44 Addition or subtraction of a pointer into, or just beyond, an array object and an integer type produces a result that points just beyond the array object and is used as the operand of a unary * operator that is evaluated

47

(warning)

The result of subtracting two pointers is not representable in an object of type ptrdiff_t (6.5.

6 45

7).

ARR30-C , ARR35-C


48

Anchor
ub_

45

48
ub_

45 Pointers that do not point into, or just beyond, the same array object are subtracted

48

(warning)

An expression is shifted by a negative number or by an amount greater than or equal to the width of the promoted expression (6.5.

6

8).

ARR36 46

INT34-C

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b7e8f21d-6cfa-43b9-affe-9839d2a02787"><ac:plain-text-body><![CDATA[

49 

Anchor
ub_49
ub_49

(warning)

An expression having signed promoted type is left-shifted and either the value of the expression is negative or the result of shifting would not be representable in the promoted type (6.5.8).


50 

Anchor
ub_

46

50
ub_

46 An array subscript is out of range, even if an object is apparently accessible with the given subscript (as in the lvalue expression a[1][7] given the declaration int a[4][5])

50

(warning)

Pointers that do not point to the same aggregate or union (nor just beyond the same array object) are compared using relational operators (6.5.

6 47

9).

 

]]></ac:plain-text-body></ac:structured-macro>

ARR36-C

51

Anchor
ub_

47

51
ub_

47 The result of subtracting two pointers is not representable in an object of type ptrdiff_t

51

(warning)

An object is assigned to an inexactly overlapping object or to an exactly overlapping object with incompatible type (6.5.

6 48

17.2).

 


52 

Anchor
ub_

48

52
ub_

48

INT34-C

49

52

(warning)

An expression

is shifted by a negative number or by an amount greater than or equal to the width of the promoted expression (6.5.7).

that is required to be an integer constant expression does not have an integer type; has operands that are not integer constants, named constants, compound literal constants, enumeration constants, character constants, predefined constants, sizeof expressions whose results are integer constants, alignof expressions, or immediately-cast floating constants; or contains casts (outside operands to sizeof and alignof operators) other than conversions of arithmetic types to integer types (6.6).


53

Anchor
ub_

49

53
ub_

49

An expression having signed promoted type is left-shifted and either the value of the expression is negative or the result of shifting would be not be representable in the promoted type (6.5.7).

 

50 Anchorub_50ub_50

Pointers that do not point to the same aggregate or union (nor just beyond the same array object) are compared using relational operators (6.5.8).

ARR36-C

51 Anchorub_51ub_51

An object is assigned to an inexactly overlapping object or to an exactly overlapping object with incompatible type (6.5.16.1).

 

52 Anchorub_52ub_52

An expression that is required to be an integer constant expression does not have an integer type; has operands that are not integer constants, enumeration constants, character constants, sizeof expressions whose results are integer constants, or immediately-cast floating constants; or contains casts (outside operands to sizeof operators) other than conversions of arithmetic types to integer types (6.6).

 

53 Anchorub_53ub_53

A constant expression in an initializer is not, or does not evaluate to, one of the following: an arithmetic constant expression, a null pointer constant, an address constant, or an address constant for an object type plus or minus an integer constant expression (6.6).

 

54 Anchorub_54ub_54

An arithmetic constant expression does not have arithmetic type; has operands that are not integer constants, floating constants, enumeration constants, character constants, or sizeof expressions; or contains casts (outside operands to sizeof operators) other than conversions of arithmetic types to arithmetic types (6.6).

 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c080426c-193c-4269-bd06-aca074ddb462"><ac:plain-text-body><![CDATA[

55 Anchorub_55ub_55

The value of an object is accessed by an array-subscript [], member-access . or ?>, address &, or indirection * operator or a pointer cast in creating an address constant (6.6).

 

]]></ac:plain-text-body></ac:structured-macro>

53

(warning)

A constant expression in an initializer is not, or does not evaluate to, one of the following: a named constant, a compound literal constant, an arithmetic constant expression, a null pointer constant, an address constant, or an address constant for a complete object type plus or minus an integer constant expression (6.6).


54

Anchor
ub_54
ub_54

(warning)

An arithmetic constant expression does not have arithmetic type; has operands that are not integer constants, floating constants, named and compound literal constants of arithmetic type, character constants, predefined constants, sizeof expressions whose results are integer constants, or alignof expressions; or contains casts (outside operands to sizeof or alignof operators) other than conversions of arithmetic types to arithmetic types (6.6).


55

Anchor
ub_55
ub_55

(warning)

The value of an object is accessed by an array-subscript [], member-access . or ->, address &, or indirection * operator or a pointer cast in creating an address constant (6.6).


56 

Anchor
ub_56
ub_56

(warning)

An identifier for an object is declared with no linkage and the type of the object is incomplete after its declarator, or after its init-declarator if it has an initializer (6.7).


57 

Anchor
ub_57
ub_57

(warning)

A function is declared at block scope with an explicit storage-class specifier other than extern (6.7.2).


58

Anchor
ub_58
ub_58

(warning)

A structure or union is defined as containing no named members (including those specified indirectly via anonymous structures and unions) (6.7.3.2).


59 

Anchor
ub_59
ub_59

(warning)

An attempt is made to access, or generate a pointer to just past, a flexible array member of a structure when the referenced object provides no elements for that array (6.7.3.2).

ARR30-C

60

Anchor
ub_60
ub_60

(warning)

When the complete type is needed, an incomplete structure or union type is not completed in the same scope by another declaration of the tag that defines the content (6.7.3.4).


61 

Anchor
ub_61
ub_61

(info)

An attempt is made to modify an object defined with a const-qualified type through use of an lvalue with non-const-qualified type (6.7.4).

EXP05-C, EXP40-C

62 

Anchor
ub_62
ub_62

(warning)

An attempt is made to refer to an object defined with a volatile-qualified type through use of an lvalue with non-volatile-qualified type (6.7.4).

EXP32-C

63

Anchor
ub_63
ub_63

(warning)

The specification of a function type includes any type qualifiers (6.7.4).


64 

Anchor
ub_64
ub_64

(warning)

Two qualified types that are required to be compatible do not have the identically qualified version of a compatible type (6.7.4).


65 

Anchor
ub_65
ub_65

(warning)

An object which has been modified is accessed through a restrict-qualified pointer to a const-qualified type, or through a restrict-qualified pointer and another pointer that are not both based on the same object (6.7.4.2).

EXP43-C

66

Anchor
ub_66
ub_66

(warning)

A restrict-qualified pointer is assigned a value based on another restricted pointer whose associated block neither began execution before the block associated with this pointer, nor ended before the assignment (6.7.4.2).


67

Anchor
ub_67
ub_67

(warning)

A function with external linkage is declared with an inline function specifier, but is not also defined in the same translation unit (6.7.5).


68

Anchor
ub_68
ub_68


A function declared with a _Noreturn function specifier returns to its caller (6.7.5).

69

Anchor
ub_69
ub_69


The definition of an object has an alignment specifier and another declaration of that object has a different alignment specifier (6.7.6).

70

Anchor
ub_70
ub_70


Declarations of an object in different translation units have different alignment specifiers (6.7.6).
71
Anchor
ub_71
ub_71

(warning)

Two pointer types that are required to be compatible are not identically qualified, or are not pointers to compatible types (6.7.7.2).


72
Anchor
ub_72
ub_72

(warning)

The size expression in an array declaration is not a constant expression and evaluates at program execution time to a nonpositive value (6.7.7.3).

ARR32-C

73
Anchor
ub_73
ub_73

(warning)

In a context requiring two array types to be compatible, they do not have compatible element types, or their size specifiers evaluate to unequal values (6.7.7.23).

EXP39-C

74

Anchor
ub_74
ub_74

(warning)

A declaration of an array parameter includes the keyword static within the [ and ] and the corresponding argument does not provide access to the first element of an array with at least the specified number of elements (6.7.7.4).


75 

Anchor
ub_75
ub_75

(warning)

A storage-class specifier or type qualifier modifies the keyword void as a function parameter type list (6.7.7.4).


76 

Anchor
ub_76
ub_76

(warning)

In a context requiring two function

56 Anchorub_56ub_56

An identifier for an object is declared with no linkage and the type of the object is incomplete after its declarator, or after its init-declarator if it has an initializer (6.7).

 

57 Anchorub_57ub_57

A function is declared at block scope with an explicit storage-class specifier other than extern (6.7.1).

 

58 Anchorub_58ub_58

A structure or union is defined as containing no named members (6.7.2.1).

 

59 Anchorub_59ub_59

An attempt is made to access, or generate a pointer to just past, a flexible array member of a structure when the referenced object provides no elements for that array (6.7.2.1).

 

60 Anchorub_60ub_60

When the complete type is needed, an incomplete structure or union type is not completed in the same scope by another declaration of the tag that defines the content (6.7.2.3).

 

61 Anchorub_61ub_61

An attempt is made to modify an object defined with a const-qualified type through use of an lvalue with non-const-qualified type (6.7.3).

EXP05-C , EXP40-C

62 Anchorub_62ub_62

An attempt is made to refer to an object defined with a volatile-qualified type through use of an lvalue with non-volatile-qualified type (6.7.3).

EXP32-C

63 Anchorub_63ub_63

The specification of a function type includes any type qualifiers (6.7.3).

 

64 Anchorub_64ub_64

Two qualified types that are required to be compatible do not have the identically qualified version of a compatible type (6.7.3).

 

65 Anchorub_65ub_65

An object which has been modified is accessed through a restrict-qualified pointer to a const-qualified type, or through a restrict-qualified pointer and another pointer that are not both based on the same object (6.7.3.1).

DCL33-C

66 Anchorub_66ub_66

A restrict-qualified pointer is assigned a value based on another restricted pointer whose associated block neither began execution before the block associated with this pointer, nor ended before the assignment (6.7.3.1).

 

67 Anchorub_67ub_67

A function with external linkage is declared with an inline function specifier, but is not also defined in the same translation unit (6.7.4).

 

68 Anchorub_68ub_68

Two pointer types that are required to be compatible are not identically qualified, or are not pointers to compatible types (6.7.5.1).

 

69 Anchorub_69ub_69

The size expression in an array declaration is not a constant expression and evaluates at program execution time to a nonpositive value (6.7.5.2).

 

70 Anchorub_70ub_70 In a context requiring two array

types to be compatible, they do not have compatible

element

return types, or their

size specifiers evaluate to unequal values

parameters disagree in use of the ellipsis terminator or the number and type of parameters (after default argument promotion, when there is no parameter type list) (6.7.

5

7.

2 71

4).

ARR34-C

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="254d29df-d351-4abb-9b3a-6cd965b43439"><ac:plain-text-body><![CDATA[


77

Anchor
ub_77
ub_77


A declaration for which a type is inferred contains a pointer, array, or function declarators (6.7.10).


78

Anchor
ub_

71

78
ub_

71 A declaration of an array parameter includes the keyword static within the [ and ] and the corresponding argument does not provide access to the first element of an array with at least the specified number of elements

78


A declaration for which a type is inferred contains no or more than one declarators (6.7.

5.3 72

10).

 

]]></ac:plain-text-body></ac:structured-macro>


79

Anchor
ub_79
ub_79

(warning)

The value of an unnamed member of a structure or union is used (6.7.11).


80

Anchor
ub_

72

80
ub_

72 A storage-class specifier or type qualifier modifies the keyword void as a function parameter type list

80

(warning)

The initializer for a scalar is neither a single expression nor a single expression enclosed in braces (6.7.

5.3 73

11).

 


81 

Anchor
ub_

73

81
ub_

73 In a context requiring two function types to be compatible, they do not have compatible return types, or their parameters disagree in use of the ellipsis terminator or the number and type of parameters (after default argument promotion, when there is no parameter type list or when one type is specified by a function definition with an identifier list)

81

(warning)

The initializer for a structure or union object is neither an initializer list nor a single expression that has compatible structure or union type (6.7.

5.3 74

11).

 


82

Anchor
ub_

74

82
ub_

74

The value of an unnamed member of a structure or union is used (6.7.8).

 

75 76 The initializer for a structure or union object that has automatic storage duration is neither an initializer list nor a single expression that has compatible structure or union type (6.7 77

82

(warning)



83

Anchor
ub_

75

83
ub_

75

The initializer for a scalar is neither a single expression nor a single expression enclosed in braces (6.7.8).

 

Anchor
ub_76ub_76

83


A function definition that does not have the asserted property is called by a function declaration or a function pointer with a type that has the unsequenced or reproducible attribute (6.7.13.8).

 


84

Anchor
ub_

77

84
ub_

77

The initializer for an aggregate or union, other than an array initialized by a string literal, is not a brace-enclosed list of initializers for its elements or members (6.7.8).

 

78 Anchorub_78ub_78 An

84

(warning)

An identifier with external linkage is used, but in the program there does not exist exactly one external definition for the identifier, or the identifier is not used and there exist multiple external definitions for the identifier (6.9).

 

DCL37-C

79

85

Anchor
ub_

79

85
ub_

79

85

(warning)

A function

definition includes an identifier list, but the types of the parameters are not declared in a following declaration list

that accepts a variable number of arguments is defined without a parameter type list that ends with the ellipsis notation (6.9.

1

2).

 


86 

80

Anchor
ub_

80 82
Anchor
ub_82ub_82

86
ub_

80

An adjusted parameter type in a function definition is not an object type (6.9.1).

 

81 Anchorub_81ub_81

A function that accepts a variable number of arguments is defined without a parameter type list that ends with the ellipsis notation (6.9.1).

 

86

(warning)

The } that terminates a function is reached, and the value of the function call is used by the caller (6.9.

1

2).

 

MSC37-C

83

87 

Anchor
ub_

83

87
ub_

83

87

(warning)

An identifier for an object with internal linkage and an incomplete type is declared with a tentative definition (6.9.

2 84

3).

 


88

Anchor
ub_

84

88
ub_88


A non-directive preprocessing directive is executed (6.10).


89

Anchor
ub_89
ub_

84

89

(warning)

The token defined is generated during the expansion of a #if or #elif preprocessing directive, or the use of the defined unary operator does not match one of the two specified forms prior to macro replacement (6.10.

1 85

2).

 


90

Anchor
ub_

85

90
ub_

85

90

(warning)

The #include preprocessing directive that results after expansion does not match one of the two header name forms (6.10.

2

3).

 

EXP43-C

86

91

Anchor
ub_

86

91
ub_

86

91

(warning)

The character sequence in an #include preprocessing directive does not start with a letter (6.10.

2 87

3).

 


92

Anchor
ub_

87

92
ub_

87

92

(warning)

There are sequences of preprocessing tokens within the list of macro arguments that would otherwise act as preprocessing directives (6.10.

3

5).

PRE32-C

88

93 

Anchor
ub_

88

93
ub_

88

93

(warning)

The result of the preprocessing operator # is not a valid character string literal (6.10.

3

5.2).

 


94 

89

Anchor
ub_

89

94
ub_

89

94

(warning)

The result of the preprocessing operator ## is not a valid preprocessing token (6.10.

3

5.3).

 


95 

90

Anchor
ub_

90

95
ub_

90

95

(warning)

The #line preprocessing directive that results after expansion does not match one of the two well-defined forms, or its digit sequence specifies zero or a number greater than 2147483647 (6.10.

4 91

6).

 


96 

Anchor
ub_

91

96
ub_

91

96

(warning)

A non-STDC #pragma preprocessing directive that is documented as causing translation failure or some other form of undefined behavior is encountered (6.10.

6

8).

 


97

92

Anchor
ub_

92

97
ub_

92

97

(warning)

A #pragma STDC preprocessing directive does not match one of the well-defined forms (6.10.

6

8).

 


98 

93

Anchor
ub_

93

98
ub_

93

98

(warning)

The name of a predefined macro, or the identifier defined, is the subject of a #define or #undef preprocessing directive (6.10.

8 94

10).

 


99

Anchor
ub_

94

99
ub_

94 95

99

(warning)

An attempt is made to copy an object to an overlapping object by use of a library function, other than as explicitly allowed (e.g., memmove) (clause 7).

 


100 

Anchor
ub_

95

100
ub_

95 96

100

(warning)

A file with the same name as one of the standard headers, not provided as part of the implementation, is placed in any of the standard places that are searched for included source files (7.1.2).

 


101

Anchor
ub_

96

101
ub_

96 97

101

(warning)

A header is included within an external declaration or definition (7.1.2).

 


102

Anchor
ub_

97

102
ub_

97

102

(warning)

A function, object, type, or macro that is specified as being declared or defined by some standard header is used before any header that declares or defines it is included (7.1.2).

 


103

98

Anchor
ub_

98

103
ub_

98 99

103

(warning)

A standard header is included while a macro is defined with the same name as a keyword (7.1.2).

 


104

Anchor
ub_

99

104
ub_

99

104

(warning)

The program attempts to declare a library function itself, rather than via a standard header, but the declaration does not have external linkage (7.1.2).

 


105

100

Anchor
ub_

100

105
ub_

100

105

(warning)

The program declares or defines a reserved identifier, other than as allowed by 7.1.4 (7.1.3).

DCL37-C

101

106

Anchor
ub_

101

106
ub_

101

106

(warning)

The program removes the definition of a macro whose name begins with an underscore and either an uppercase letter or another underscore (7.1.3).

 


107

102

Anchor
ub_

102

107
ub_

102

107

(error)

An argument to a library function has an invalid value or a type not expected by a function with a variable number of arguments (7.1.4).

 


108

103

Anchor
ub_

103

108
ub_

103 104

108

(info)

The pointer passed to a library function array parameter does not have a value such that all address computations and object accesses are valid (7.1.4).

 

ARR30-C, ARR38-C

109

Anchor
ub_

104

109
ub_

104

109

(warning)

The macro definition of assert is suppressed in order to access an actual function (7.2).

 

MSC38-C

105

110

Anchor
ub_

105

110
ub_

105 106

110

(warning)

The argument to the assert macro does not have a scalar type (7.2).

 


111 

Anchor
ub_

106

111
ub_

106 107

111

(warning)

The CX_LIMITED_RANGE, FENV_ACCESS, or FP_CONTRACT pragma is used in any context other than outside all external declarations or preceding all explicit declarations and statements inside a compound statement (7.3.4, 7.6.1, 7.12.2).

 


112

Anchor
ub_

107

112
ub_

107

112

(warning)

The value of an argument to a character handling function is neither equal to the value of EOF nor representable as an unsigned char (7.4).

STR37-C

108

113

Anchor
ub_

108

113
ub_

108 109

113

(warning)

A macro definition of errno is suppressed in order to access an actual object, or the program defines an identifier with the name errno (7.5).

 

DCL37-C, MSC38-C

114

Anchor
ub_

109

114
ub_

109

114

(warning)

Part of the program tests floating-point status flags, sets floating-point control modes, or runs under non-default mode settings, but was translated with the state for the FENV_ACCESS pragma

‘‘off’’ 110

"off" (7.6.1).

 


115

Anchor
ub_

110

115
ub_

110

115

(warning)

The exception-mask argument for one of the functions that provide access to the floating-point status flags has a nonzero value not obtained by bitwise OR of the floating-point exception macros (7.6.2).

 


116

111

Anchor
ub_

111

116
ub_

111

116

(warning)

The fesetexceptflag function is used to set floating-point status flags that were not specified in the call to the fegetexceptflag function that provided the value of the corresponding fexcept_t object (7.6.

2

4.

4

5).

 


117

112

Anchor
ub_

112

117
ub_

112

117

(warning)

The argument to fesetenv or feupdateenv is neither an object set by a call to fegetenv or feholdexcept, nor is it an environment macro (7.6.

4

6.3, 7.6.

4 113

6.4).

 


118

Anchor
ub_

113

118
ub_

113

118

(warning)

The value of the result of an integer arithmetic or conversion function cannot be represented (7.8.2.1, 7.8.2.2, 7.8.2.3, 7.8.2.4, 7.

20

24.6.1, 7.

20

24.6.2, 7.

20

24.1).

 

ERR07-C

114

119 

Anchor
ub_

114

119
ub_

114

119

(info)

The program modifies the string pointed to by the value returned by the setlocale function (7.11.1.1).

 

ENV30-C

115

120

Anchor
ub_

115

120
ub_

115 The program modifies the structure pointed to by the value returned by the localeconv function

120


A pointer returned by the setlocale function is used after a subsequent call to the function, or after the calling thread has exited (7.11.1.1).


121 

Anchor
ub_121
ub_121

(info)

The program modifies the structure pointed to by the value returned by the localeconv function (7.11.2.1).

 

ENV30-C

116

122

Anchor
ub_

116

122
ub_

116

122

(warning)

The initializer for an aggregate or union, other than an array initialized by a string literal, is not a brace-enclosed list of initializers for its elements or members (6.7.11).A macro definition of math_errhandling is suppressed or the program defines an identifier with the name math_errhandling (7.12).

 

MSC38-C

117

123

Anchor
ub_

117

123
ub_

117

123

(warning)

An argument to a floating-point classification or comparison macro is not of real floating type (7.12.3, 7.12.

14 118

17).

 


124

Anchor
ub_

118

124
ub_

118

124

(warning)

A macro definition of setjmp is suppressed

in order

to access an actual function, or the program defines an external identifier with the name setjmp (7.13).

 

MSC38-C

119

125

Anchor
ub_

119

125
ub_

119

125

(warning)

An

inv ocation

invocation of the setjmp macro occurs other than in an allowed context (7.13.2.1).

 

MSC22-C

120

126 

Anchor
ub_

120

126
ub_

120

126

(info)

The longjmp function is invoked to restore a nonexistent environment (7.13.2.1).

 

MSC22-C

121

127

Anchor
ub_

121

127
ub_

121

127

(warning)

After a longjmp, there is an attempt to access the value of an object of automatic storage class with non-volatile-qualified type, local to the function containing the invocation of the corresponding setjmp macro, that was changed between the setjmp invocation and longjmp call (7.13.2.1).

 

MSC22-C

122

128 

Anchor
ub_

122

128
ub_

122

128

(info)

The program specifies an invalid pointer to a signal handler function (7.14.1.1).

 


129 

123

Anchor
ub_

123

129
ub_

123

129

(warning)

A signal handler returns when the signal corresponded to a computational exception (7.14.1.1).

SIG31-C

124
130
Anchor
ub_
124
130
ub_
124
130

A signal
occurs as the result of calling the abort or raise function, and the signal handler calls
handler called in response to SIGFPE, SIGILL, SIGSEGV, or any other implementation-defined value corresponding to a computational exception returns (7.14.1.1).SIG35-C

131

Anchor
ub_131
ub_131

(info)

A signal occurs as the result of calling the abort or raise function, and the signal handler calls the raise function (7.14.1.1).

SIG33

SIG30-C,
SIG31-C

125

132

Anchor
ub_

125

132
ub_

125

132

(warning)

A signal occurs other than as the result of calling the abort or raise function, and the

signal handler

signal handler refers to an object with static or thread storage duration that is not a lock-free atomic object other than by assigning a value to an object declared as volatile sig_atomic_t, or calls any function in the standard library other than the abort function, the_Exit function,

or

the

signal function (for the same signal number) (

quick_exit function, the functions in <stdatomic.h> (except where explicitly stated otherwise) when the atomic arguments are lock-free, the atomic_is_lock_free function with any atomic argument, or the signal function (for the same signal number) (7.14.1.1).

SIG31-C

126

133 

Anchor
ub_

126

133
ub_

126

133

(warning)

The value of errno is referred to after a signal occurred other than as the result of calling the abort or raise function and the corresponding signal handler obtained a SIG_ERR return from a call to the signal function (7.14.1.1).

 

ERR32-C

127

134

Anchor
ub_

127

134
ub_

127 128

134

(info)

A signal is generated by an asynchronous signal handler (7.14.1.1).

 


135
Anchor
ub_135
ub_135

The signal function is used in a multi-threaded program (7.14.1.1).CON37-C

136 

Anchor
ub_

128

136
ub_

128

136

(warning)

A function with a variable number of arguments attempts to access its varying arguments other than through a properly declared and initialized va_list object, or before the va_start macro is invoked (7.

15

16, 7.

15

16.1.1, 7.

15 129

16.1.4).

 


137

Anchor
ub_

129

137
ub_

129

137

(warning)

The macro va_arg is invoked using the parameter ap that was passed to a function that invoked the macro va_arg with the same parameter (7.

15

16).

 


138

130

Anchor
ub_

130

138
ub_

130

138

(warning)

A macro definition of va_start, va_arg, va_copy, or va_end is suppressed in order to access an actual function, or the program defines an external identifier with the name va_copy or va_end (7.

15

16.1).

 

MSC38-C

131

139

Anchor
ub_

131

139
ub_

131

139

(warning)

The va_start or va_copy macro is invoked without a corresponding invocation of the va_end macro in the same function, or vice versa (7.

15

16.1, 7.

15

16.1.2, 7.

15

16.1.3, 7.

15 132

16.1.4).

 


140

Anchor
ub_

132

140
ub_

132

140


The

type parameter to the

va_arg macro is

not such that a pointer to an object of that type can be obtained simply by postfixing a * (7.15

invoked when there is no actual next argument, or with a specified type that is not compatible with the promoted type of the actual next argument, with certain exceptions (7.16.1.1).

  138


141

133

Anchor
ub_

133

141
ub_

133

141

(warning)

The type parameter to the va_arg macro is

invoked when there is no actual next argument, or with a specified type that is not compatible with the promoted type of the actual next argument, with certain exceptions (7.15

not such that a pointer to an object of that type can be obtained simply by postfixing a * (7.16.1.1).

DCL10-C


142

134

Anchor
ub_

134

142
ub_

134 The va_copy or va_start macro is called to initialize a va_list that was previously initialized

142


Using a null pointer constant in form of an integer expression as an argument to a . . . function and then interpreting it as a void* or char* (7.16.1.1).


143 

Anchor
ub_143
ub_143

(warning)

The va_copy or va_start macro is called to initialize a va_list that was previously initialized by either macro without an intervening invocation of the va_end macro for the same va_list (7.

15

16.1.2, 7.

15

16.1.4).

  136


144

135

Anchor
ub_

135

144
ub_

135

144

(warning)

The

parameter parmN of a

 

va_start macro is

declared with the register storage class, with a function or array type, or with a type that is not compatible with the type that results after application of the default argument promotions (7.15.1.4).

invoked with additional arguments that include unbalanced parentheses, or unrecognized preprocessing tokens (7.16.1.4).


145 

Anchor
ub_145
ub_145


The macro definition of a generic function is suppressed to access an actual function (7.17.1, 7.18).


146

Anchor
ub_

136

146
ub_

136

146


The

member designator

type parameter of an offsetof macro

is an invalid right operand of the . operator for the type parameter, or designates a bit-field

defines a new type (7.

17 137

21).

EXP38-C


147

Anchor
ub_

137

147
ub_

137

The argument in an instance of one of the integer-constant macros is not a decimal, octal, or hexadecimal constant, or it has a value that exceeds the limits for the corresponding type (7.18.4).

 

141 142 The

147


When program execution reaches an unreachable() macro invocation (7.21.1).


148

Anchor
ub_

138

148
ub_

138 A byte input/output function is applied to a wide-oriented stream, or a wide character input/output function is applied to a byte-oriented stream (7.19

148


Arbitrarily copying or changing the bytes of or copying from a non-null pointer into a nullptr_t object and then reading that object (7.21.2).

  140


149

139

Anchor
ub_

139

149
ub_

139

Use is made of any portion of a file beyond the most recent wide character written to a wide-oriented stream (7.19.2).

 

149

(warning)

The member designator parameter of an offsetof macro is an invalid right operand of the . operator for the type parameter, or designates a bit-field (7.21).


150

Anchor
ub_

140

150
ub_

140

150

(warning)

The

value of a pointer to a FILE object is used after the associated file is closed (7.19.3).

argument in an instance of one of the integer-constant macros is not a decimal, octal, or hexadecimal constant, or it has a value that exceeds the limits for the corresponding type (7.22.4).


151

Anchor
ub_151
ub_151

(info)

A byte input/output function is applied to a wide-oriented stream, or a wide character input/output function is applied to a byte-oriented stream (7.23.2).


152

Anchor
ub_152
ub_152


Use is made of any portion of a file beyond the most recent wide character written to a wide-oriented stream (7.23.2).


153

Anchor
ub_153
ub_153

(info)

The value of a pointer to a FILE object is used after the associated file is closed (7.23.3).

FIO46-C

154

Anchor
ub_154
ub_154

(info)

The stream for the fflush function points to an input stream or to an update stream in which the most recent operation was input (7.23.5.2).


155

Anchor
ub_155
ub_155

(plus)

The

 

Anchor
ub_141ub_141

The stream for the fflush function points to an input stream or to an update stream in which the most recent operation was input (7.19.5.2).

 

Anchor
ub_142ub_142

string pointed to by the mode argument in a call to the fopen function does not exactly match one of the specified character sequences (7.

19

23.5.3).

 


156

143

Anchor
ub_

143

156
ub_

143

156

(info)

An output operation on an update stream is followed by an input operation without an intervening call to the fflush function or a file positioning function, or an input operation on an update stream is followed by an output operation with an intervening call to a file positioning function (7.

19

23.5.3).

 

FIO39-C

144

157

Anchor
ub_

144

157
ub_

144

157

(warning)

An attempt is made to use the contents of the array that was supplied in a call to the setvbuf function (7.

19

23.5.6).

 


158 

145

Anchor
ub_

145

158
ub_

145

158

(info)

There are insufficient arguments for the format in a call to one of the formatted input/output functions, or an argument does not have an appropriate type (7.

19

23.6.1, 7.

19

23.6.2, 7.

24

31.2.1, 7.

24

31.2.2).

 

FIO47-C

146

159

Anchor
ub_

146

159
ub_

146

159

(info)

The format in a call to one of the formatted input/output functions or to the strftime or wcsftime function is not a valid multibyte character sequence that begins and ends in its initial shift

state

state (7.

19

23.6.1, 7.

19

23.6.2, 7.

23

29.3.5, 7.

24

31.2.1, 7.

24

31.2.2, 7.

24 147

31.5.1).

 


160

Anchor
ub_

147

160
ub_

147

160

(warning)

In a call to one of the formatted output functions, a precision appears with a conversion specifier other than those described (7.

19

23.6.1, 7.

24

31.2.1).

 FIO47-C 

148

161

Anchor
ub_

148

161
ub_

148

161

(info)

A conversion specification for a formatted output function uses an asterisk to denote an argument-supplied field width or precision, but the corresponding argument is not provided (7.

19

23.6.1, 7.

24 149

31.2.1).

 


162

Anchor
ub_

149

162
ub_

149

162

(warning)

A conversion specification for a formatted output function uses a # or 0 flag with a conversion specifier other than those described (7.

19

23.6.1, 7.

24

31.2.1).

 

150

FIO47-C 

163
Anchor
ub_
150
163
ub_
150
163

(info)

A conversion specification for one of the formatted input/output functions uses a length modifier with a conversion specifier other than those described (7.

19

23.6.1, 7.

19

23.6.2, 7.

24

31.2.1,7.

24

31.2.2).

 FIO47-C 

151

164

Anchor
ub_

151

164
ub_

151

164

(info)

An s conversion specifier is encountered by one of the formatted output functions, and the argument is missing the null terminator (unless a precision is specified that does not require null termination) (7.

19

23.6.1, 7.

24 152

31.2.1).

 


165

Anchor
ub_

152

165
ub_

152 Annconversion

165

(warning)

An n conversion specification for one of the formatted input/output functions includes any flags, an assignment-suppressing character, a field width, or a precision (7.

19

23.6.1, 7.

19

23.6.2,

7

 7.

24

31.2.1, 7.

24 153

31.2.2).

 


166

Anchor
ub_

153

166
ub_

153

166

(warning)

A % conversion specifier is encountered by one of the formatted input/output functions, but the complete conversion specification is not exactly %% (7.

19

23.6.1, 7.

19

23.6.2, 7.

24

31.2.1, 7.

24

31.2.2).

 FIO47-C 

154

167

Anchor
ub_

154

167
ub_

154

167

(warning)

An

inv alid

invalid conversion specification is found in the format for one of the formatted input/output functions, or the strftime or wcsftime function (7.

19

23.6.1, 7.

19

23.6.2, 7.

23

29.3.5, 7.

24

31.2.1,

7

 7.

24

31.2.2, 7.

24

31.5.1).

 

FIO47-C

155

168

Anchor
ub_

155

168
ub_

155

168


The number of characters or wide characters transmitted by a formatted output function (or written to an array, or that would have been written to an array) is greater than INT_MAX (7.
19
23.6.1, 7.
19.6.3, 7.19.6.8, 7.19.6.10).

 

31.2.1).

169

Anchor
ub_169
ub_169

(warning)

The number of input items assigned by a formatted input function is greater than INT_MAX (7.23.6.2, 7.31.2.2).


170

Anchor
ub_170
ub_170

(info)

156 Anchorub_156ub_156

The result of a conversion by one of the formatted input functions cannot be represented in the corresponding object, or the receiving object does not have an appropriate type (7.

19

23.6.2, 7.

24

31.2.2).

 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="59e061be-911b-4ff4-b7a8-f444e407634b"><ac:plain-text-body><![CDATA[

157 Anchorub_157ub_157

A c, s, or [ conversion specifier is encountered by one of the formatted input functions, and the array pointed to by the corresponding argument is not large enough to accept the input sequence (and a null terminator if the conversion specifier is s or [) (7.19.6.2, 7.24.2.2).

 

]]></ac:plain-text-body></ac:structured-macro>


171

Anchor
ub_171
ub_171

(info)

A c, s, or [ conversion specifier is encountered by one of the formatted input functions, and the array pointed to by the corresponding argument is not large enough to accept the input sequence (and a null terminator if the conversion specifier is s or [) (7.23.6.2, 7.31.2.2).


172

Anchor
ub_172
ub_172

(info)

A c, s, or [ conversion specifier with an l qualifier is encountered by one of the formatted input functions, but the input is not a valid multibyte character sequence that begins in the initial shift state (7.23.6.2, 7.31.2.2).


173

Anchor
ub_173
ub_173

(warning)

The input item for a %p conversion by one of the formatted input functions is not a value converted earlier during the same program execution (7.23.6.2, 7.31.2.2).


174

Anchor
ub_174
ub_174

(info)

The vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf, vsscanf, vfwprintf, vfwscanf, vswprintf, vswscanf, vwprintf, or vwscanf function is called with an improperly initialized va_list argument, or the argument is used (other than in an invocation of va_end) after the function returns (7.23.6.8, 7.23.6.9, 7.23.6.10, 7.23.6.11, 7.23.6.12, 7.23.6.13, 7.23.6.14, 7.31.2.5, 7.31.2.6, 7.31.2.7, 7.31.2.8, 7.31.2.9, 7.31.2.10).


175

Anchor
ub_175
ub_175

(warning)

The contents of the array supplied in a call to the fgets, gets, or fgetws function are used after a read error occurred (7.23.7.2, 7.31.3.2).

FIO40-C

176

Anchor
ub_176
ub_176


The n parameter is negative or zero for a call to fgets or fgetws. (7.23.7.2, 7.31.3.2).


177 

Anchor
ub_177
ub_177

(warning)

The file position indicator for a binary stream is used after a call to the ungetc function where its value was zero before the call (7.23.7.11).


178
Anchor
ub_178
ub_178

(warning)

The file position indicator for a stream is used after an error occurred during a call to the fread or fwrite function (7.23.8.1, 7.23.8.2).


179

Anchor
ub_179
ub_179

(warning)

A partial element read by a call to the fread function is used (7.23.8.1).


180

Anchor
ub_180
ub_180

(warning)

The fseek function is called for a text stream with a nonzero offset and either the offset was not returned by a previous successful call to the ftell function on a stream associated with the same file or whence is not SEEK_SET (7.23.9.2).


181

Anchor
ub_181
ub_181

(warning)

The fsetpos function is called to set a position that was not returned by a previous successful call to the fgetpos function on a stream associated with the same file (7.23.9.3).

FIO44-C

182

Anchor
ub_182
ub_182

(warning)

A non-null pointer returned by a call to the calloc, malloc, realloc, or aligned_alloc function with a zero requested size is used to access an object (7.24.3).

MEM04-C

183

Anchor
ub_183
ub_183

(error)

The value of a pointer that refers to space deallocated by a call to the free or realloc function is used (7.24.3).

MEM30-C

184

Anchor
ub_184
ub_184

(info)

The pointer argument to the free or realloc function is unequal to a null pointer and does not match a pointer earlier returned by a memory management function, or the space has been deallocated by a call to free or realloc (7.24.3.3, 7.24.3.7).

MEM34-C

185
Anchor
ub_185
ub_185

(warning)

The value of the object allocated by the malloc function is used (7.24.3.4).


186

Anchor
ub_186
ub_186

(warning)

The values of any bytes in a new object allocated by the realloc function beyond the size of the old object are used (7.24.3.7).

EXP33-C

187 

Anchor
ub_187
ub_187

(warning)

The program calls the exit or quick_exit function more than once, or calls both functions (7.24.4.4, 7.24.4.7).

ENV32-C,

ERR04-C

188

Anchor
ub_188
ub_188

(warning)

During the call to a function registered with the atexit or at_quick_exit function, a call is made to the longjmp function that would terminate the call to the registered function (7.24.4.4, 7.24.4.7).

ENV32-C

189

Anchor
ub_189
ub_189

(info)

The string set up by the getenv or strerror function is modified by the program (7.24.4.6, 7.26.6.3).

ENV30-C

190

Anchor
ub_190
ub_190


A signal is raised while the quick_exit function is executing (7.24.4.7).

191

Anchor
ub_191
ub_191

(info)

A command is executed through the system function in a way that is documented as causing termination or some other form of undefined behavior (7.24.4.8).


192

Anchor
ub_192
ub_192

(info)

A searching or sorting utility function is called with an invalid pointer argument, even if the number of elements is zero (7.24.5).


193

Anchor
ub_193
ub_193

(warning)

The comparison function called by a searching or sorting utility function alters the contents of the array being searched or sorted, or returns ordering values inconsistently (7.24.5).


194

Anchor
ub_194
ub_194

(warning)

The array being searched by the bsearch function does not have its elements in proper order (7.24.5.1).


195

Anchor
ub_195
ub_195

(warning)

The current conversion state is used by a multibyte/wide character conversion function after changing the LC_CTYPE category (7.24.7).


196

Anchor
ub_196
ub_196

(error)

A string or wide string utility function is instructed to access an array beyond the end of an object (7.26.1, 7.31.4).


197
Anchor
ub_197
ub_197

(info)

A string or wide string utility function is called with an invalid pointer argument, even if the length is zero (7.26.1, 7.31.4).


198

Anchor
ub_198
ub_198

(warning)

The contents of the destination array are used after a call to the strxfrm, strftime, wcsxfrm, or wcsftime function in which the specified length was too small to hold the entire null-terminated result (7.26.4.5, 7.29.3.5, 7.31.4.4.4, 7.31.5.1).


199

Anchor
ub_199
ub_199


A sequence of calls of the strtok function is made from different threads (7.26.5.9).


200

Anchor
ub_200
ub_200

(warning)

The first argument in the very first call to the strtok or wcstok is a null pointer (7.26.5.9, 7.31.4.5.8).


201

Anchor
ub_201
ub_201


A pointer returned by the strerror function is used after a subsequent call to the function, or after the calling thread has exited (7.26.6.3).


202

Anchor
ub_202
ub_202

(warning)

The type of an argument to a type-generic macro is not compatible with the type of the corresponding parameter of the selected function (7.27).


203

Anchor
ub_203
ub_203


Arguments for generic parameters of a type-generic macro are such that some argument has a corresponding real type that is of standard floating type and another argument is of decimal floating type (7.27).


204

Anchor
ub_204
ub_204


Arguments for generic parameters of a type-generic macro are such that neither <math.h> and <complex.h> define a function whose generic parameters have the determined corresponding real type (7.27).


205

Anchor
ub_205
ub_205

(warning)

A complex argument is supplied for a generic parameter of a type-generic macro that has no corresponding complex function (7.27).


206

Anchor
ub_206
ub_206


A decimal floating argument is supplied for a generic parameter of a type-generic macro that expects a complex argument (7.27).


207

Anchor
ub_207
ub_207


A standard floating or complex argument is supplied for a generic parameter of a type-generic macro that expects a decimal floating type argument (7.27).


208

Anchor
ub_208
ub_208


A non-recursive mutex passed to mtx_lock is locked by the calling thread (7.28.4.3).


209

Anchor
ub_209
ub_209


The mutex passed to mtx_timedlock does not support timeout (7.28.4.4).


210

Anchor
ub_210
ub_210


The mutex passed to mtx_unlock is not locked by the calling thread (7.28.4.6).


211

Anchor
ub_211
ub_211


The thread passed to thrd_detach or thrd_join was previously detached or joined with another thread (7.28.5.3, 7.28.5.6).


212

Anchor
ub_212
ub_212


The tss_create function is called from within a destructor (7.28.6.1).


213

Anchor
ub_213
ub_213


The key passed to tss_delete, tss_get, or tss_set was not returned by a call to tss_create before the thread commenced executing destructors (7.28.6.2, 7.28.6.3, 7.28.6.4).


214

Anchor
ub_214
ub_214


An attempt is made to access the pointer returned by the time conversion functions after the thread that originally called the function to obtain it has exited (7.29.3).


215

Anchor
ub_215
ub_215


At least one member of the broken-down time passed to asctime contains a value outside its normal range, or the calculated year exceeds four digits or is less than the year 1000 (7.29.3.1).

216

Anchor
ub_216
ub_216

(warning)

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3c9d179a-4e01-4101-b453-912ed627e7f4"><ac:plain-text-body><![CDATA[

158 Anchorub_158ub_158

A c, s, or [ conversion specifier with an l qualifier is encountered by one of the formatted input functions, but the input is not a valid multibyte character sequence that begins in the initial shift state (7.19.6.2, 7.24.2.2).

 

]]></ac:plain-text-body></ac:structured-macro>

159 Anchorub_159ub_159

The input item for a %p conversion by one of the formatted input functions is not a value converted earlier during the same program execution (7.19.6.2, 7.24.2.2).

 

160 Anchorub_160ub_160

The vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf, vsscanf, vfwprintf, vfwscanf, vswprintf, vswscanf, vwprintf, or vwscanf function is called with an improperly initialized va_list argument, or the argument is used (other than in an invocation of va_end) after the function returns (7.19.6.8, 7.19.6.9, 7.19.6.10, 7.19.6.11, 7.19.6.12, 7.19.6.13, 7.19.6.14, 7.24.2.5, 7.24.2.6, 7.24.2.7, 7.24.2.8, 7.24.2.9, 7.24.2.10).

 

161 Anchorub_161ub_161

The contents of the array supplied in a call to the fgets, gets, or fgetws function are used after a read error occurred (7.19.7.2, 7.19.7.7, 7.24.3.2).

 

162 Anchorub_162ub_162

The file position indicator for a binary stream is used after a call to the ungetc function where its value was zero before the call (7.19.7.11).

 

163 Anchorub_163ub_163

The file position indicator for a stream is used after an error occurred during a call to the fread or fwrite function (7.19.8.1, 7.19.8.2).

 

164 Anchorub_164ub_164

A partial element read by a call to the fread function is used (7.19.8.1).

 

165 Anchorub_165ub_165

The fseek function is called for a text stream with a nonzero offset and either the offset was not returned by a previous successful call to the ftell function on a stream associated with the same file or whence is not SEEK_SET (7.19.9.2).

 

166 Anchorub_166ub_166

The fsetpos function is called to set a position that was not returned by a previous successful call to the fgetpos function on a stream associated with the same file (7.19.9.3).

 

167 Anchorub_167ub_167

A non-null pointer returned by a call to the calloc, malloc, or realloc function with a zero requested size is used to access an object (7.20.3).

 

168 Anchorub_168ub_168

The value of a pointer that refers to space deallocated by a call to the free or realloc function is used (7.20.3).

 

169 Anchorub_169ub_169

The pointer argument to the free or realloc function does not match a pointer earlier returned by calloc, malloc, or realloc, or the space has been deallocated by a call to free or realloc (7.20.3.2, 7.20.3.4).

MEM31-C

170 Anchorub_170ub_170

The value of the object allocated by the malloc function is used (7.20.3.3).

 

171 Anchorub_171ub_171

The value of any bytes in a new object allocated by the realloc function beyond the size of the old object are used (7.20.3.4).

 

172 Anchorub_172ub_172

The program executes more than one call to the exit function (7.20.4.3).

 

173 Anchorub_173ub_173

During the call to a function registered with the atexit function, a call is made to the longjmp function that would terminate the call to the registered function (7.20.4.3).

 

174 Anchorub_174ub_174

The string set up by the getenv or strerror function is modified by the program (7.20.4.5, 7.21.6.2).

 

175 Anchorub_175ub_175

A command is executed through the system function in a way that is documented as causing termination or some other form of undefined behavior (7.20.4.6).

 

176 Anchorub_176ub_176

A searching or sorting utility function is called with an invalid pointer argument, even if the number of elements is zero (7.20.5).

 

177 Anchorub_177ub_177

The comparison function called by a searching or sorting utility function alters the contents of the array being searched or sorted, or returns ordering values inconsistently (7.20.5).

 

178 Anchorub_178ub_178

The array being searched by the bsearch function does not have its elements in proper order (7.20.5.1).

 

179 Anchorub_179ub_179

The current conversion state is used by a multibyte/wide character conversion function after changing the LC_CTYPE category (7.20.7).

 

180 Anchorub_180ub_180

A string or wide string utility function is instructed to access an array beyond the end of an object (7.21.1, 7.24.4).

 

181 Anchorub_181ub_181

A string or wide string utility function is called with an invalid pointer argument, even if the length is zero (7.21.1, 7.24.4).

 

182 Anchorub_182ub_182

The contents of the destination array are used after a call to the strxfrm, strftime, wcsxfrm, or wcsftime function in which the specified length was too small to hold the entire null-terminated result (7.21.4.5, 7.23.3.5, 7.24.4.4.4, 7.24.5.1).

 

183 Anchorub_183ub_183

The first argument in the very first call to the strtok or wcstok is a null pointer (7.21.5.8, 7.24.4.5.7).

 

184 Anchorub_184ub_184

The type of an argument to a type-generic macro is not compatible with the type of the corresponding parameter of the selected function (7.22).

 

185 Anchorub_185ub_185

A complex argument is supplied for a generic parameter of a type-generic macro that has no corresponding complex function (7.22).

 

186 Anchorub_186ub_186

The argument corresponding to an s specifier without an l qualifier in a call to the fwprintf function does not point to a valid multibyte character sequence that begins in the initial shift state (7.

24 187

31.2.11).

 


217

Anchor
ub_

187

217
ub_

187

217

(info)

In a call to the wcstok function, the object pointed to by ptr does not have the value stored by the previous call for the same wide string (7.

24

31.4.5.

7

8).

 


218

188

Anchor
ub_

188

218
ub_

188

218

(info)

An mbstate_t object is used inappropriately (7.

24

31.6).

 

EXP33-C

189

219

Anchor
ub_

189

219
ub_

189

219

(warning)

The value of an argument of type wint_t to a wide character classification or case mapping function is neither equal to the value of WEOF nor representable as a wchar_t (7.

25 190

32.1).

 


220

Anchor
ub_

190

220
ub_

190

220

(warning)

The iswctype function is called using a different LC_CTYPE category from the one in effect for the call to the wctype function that returned the description (7.

25

32.2.2.1).

 

191


221

Anchor
ub_

191

221
ub_

191

221

(warning)

The towctrans function is called using a different LC_CTYPE category from the one in effect for the call to the wctrans function that returned the description (7.

25

32.3.2.1).

 


Graphical symbols used in the preceding table:

Symbol

C11 Classification

(error)

Critical Undefined Behavior

(warning)

Bounded Undefined Behavior

(info)

Undefined Behavior (information/confirmation needed)

(plus)

Possible Conforming Language Extension


...

Image Added Image Added Image Added