|
| 1 | +— A ‘‘shall’’ or ‘‘shall not’’ requirement that appears outside of a constraint is violated |
| 2 | +(clause 4). |
| 3 | + |
| 4 | +— A nonempty source file does not end in a new-line character which is not immediately |
| 5 | +preceded by a backslash character or ends in a partial preprocessing token or |
| 6 | +comment (5.1.1.2). |
| 7 | + |
| 8 | +— Token concatenation produces a character sequence matching the syntax of a |
| 9 | +universal character name (5.1.1.2). |
| 10 | + |
| 11 | +— A program in a hosted environment does not define a function named main using one |
| 12 | +of the specified forms (5.1.2.2.1). |
| 13 | + |
| 14 | +— The execution of a program contains a data race (5.1.2.4). |
| 15 | + |
| 16 | +— A character not in the basic source character set is encountered in a source file, except |
| 17 | +in an identifier, a character constant, a string literal, a header name, a comment, or a |
| 18 | +preprocessing token that is never converted to a token (5.2.1). |
| 19 | + |
| 20 | +— An identifier, comment, string literal, character constant, or header name contains an |
| 21 | +invalid multibyte character or does not begin and end in the initial shift state (5.2.1.2). |
| 22 | + |
| 23 | +— The same identifier has both internal and external linkage in the same translation unit |
| 24 | +(6.2.2). |
| 25 | + |
| 26 | +— An object is referred to outside of its lifetime (6.2.4). |
| 27 | + |
| 28 | +— The value of a pointer to an object whose lifetime has ended is used (6.2.4). |
| 29 | + |
| 30 | +— The value of an object with automatic storage duration is used while it is |
| 31 | +indeterminate (6.2.4, 6.7.9, 6.8). |
| 32 | + |
| 33 | +— A trap representation is read by an lvalue expression that does not have character type |
| 34 | +(6.2.6.1). |
| 35 | + |
| 36 | +— A trap representation is produced by a side effect that modifies any part of the object |
| 37 | +using an lvalue expression that does not have character type (6.2.6.1). |
| 38 | + |
| 39 | +— The operands to certain operators are such that they could produce a negative zero |
| 40 | +result, but the implementation does not support negative zeros (6.2.6.2). |
| 41 | + |
| 42 | +— Two declarations of the same object or function specify types that are not compatible |
| 43 | +(6.2.7). |
| 44 | + |
| 45 | +— A program requires the formation of a composite type from a variable length array |
| 46 | +type whose size is specified by an expression that is not evaluated (6.2.7). |
| 47 | + |
| 48 | +— Conversion to or from an integer type produces a value outside the range that can be |
| 49 | +represented (6.3.1.4). |
| 50 | + |
| 51 | +— Demotion of one real floating type to another produces a value outside the range that |
| 52 | +can be represented (6.3.1.5). |
| 53 | + |
| 54 | +— An lvalue does not designate an object when evaluated (6.3.2.1). |
| 55 | + |
| 56 | +— A non-array lvalue with an incomplete type is used in a context that requires the value |
| 57 | +of the designated object (6.3.2.1). |
| 58 | + |
| 59 | +— An lvalue designating an object of automatic storage duration that could have been |
| 60 | +declared with the register storage class is used in a context that requires the value |
| 61 | +of the designated object, but the object is uninitialized. (6.3.2.1). |
| 62 | + |
| 63 | +— An lvalue having array type is converted to a pointer to the initial element of the |
| 64 | +array, and the array object has register storage class (6.3.2.1). |
| 65 | + |
| 66 | +— An attempt is made to use the value of a void expression, or an implicit or explicit |
| 67 | +conversion (except to void) is applied to a void expression (6.3.2.2). |
| 68 | + |
| 69 | +— Conversion of a pointer to an integer type produces a value outside the range that can |
| 70 | +be represented (6.3.2.3). |
| 71 | + |
| 72 | +— Conversion between two pointer types produces a result that is incorrectly aligned |
| 73 | +(6.3.2.3). |
| 74 | + |
| 75 | +— A pointer is used to call a function whose type is not compatible with the referenced |
| 76 | +type (6.3.2.3). |
| 77 | + |
| 78 | +— An unmatched ' or " character is encountered on a logical source line during |
| 79 | +tokenization (6.4). |
| 80 | + |
| 81 | +— A reserved keyword token is used in translation phase 7 or 8 for some purpose other |
| 82 | +than as a keyword (6.4.1). |
| 83 | + |
| 84 | +— A universal character name in an identifier does not designate a character whose |
| 85 | +encoding falls into one of the specified ranges (6.4.2.1). |
| 86 | + |
| 87 | +— The initial character of an identifier is a universal character name designating a digit |
| 88 | +(6.4.2.1). |
| 89 | + |
| 90 | +— Two identifiers differ only in nonsignificant characters (6.4.2.1). |
| 91 | + |
| 92 | +— The identifier __func__ is explicitly declared (6.4.2.2). |
| 93 | + |
| 94 | +— The program attempts to modify a string literal (6.4.5). |
| 95 | + |
| 96 | +— The characters ', \, ", //, or /* occur in the sequence between the < and > |
| 97 | +delimiters, or the characters ', \, //, or /* occur in the sequence between the " |
| 98 | +delimiters, in a header name preprocessing token (6.4.7). |
| 99 | + |
| 100 | +— A side effect on a scalar object is unsequenced relative to either a different side effect |
| 101 | +on the same scalar object or a value computation using the value of the same scalar |
| 102 | +object (6.5). |
| 103 | + |
| 104 | +— An exceptional condition occurs during the evaluation of an expression (6.5). |
| 105 | + |
| 106 | +— An object has its stored value accessed other than by an lvalue of an allowable type |
| 107 | +(6.5). |
| 108 | + |
| 109 | +— For a call to a function without a function prototype in scope, the number of |
| 110 | +arguments does not equal the number of parameters (6.5.2.2). |
| 111 | + |
| 112 | +— For call to a function without a function prototype in scope where the function is |
| 113 | +defined with a function prototype, either the prototype ends with an ellipsis or the |
| 114 | +types of the arguments after promotion are not compatible with the types of the |
| 115 | +parameters (6.5.2.2). |
| 116 | + |
| 117 | +— For a call to a function without a function prototype in scope where the function is not |
| 118 | +defined with a function prototype, the types of the arguments after promotion are not |
| 119 | +compatible with those of the parameters after promotion (with certain exceptions) |
| 120 | +(6.5.2.2). |
| 121 | + |
| 122 | +— A function is defined with a type that is not compatible with the type (of the |
| 123 | +expression) pointed to by the expression that denotes the called function (6.5.2.2). |
| 124 | + |
| 125 | +— A member of an atomic structure or union is accessed (6.5.2.3). |
| 126 | + |
| 127 | +— The operand of the unary * operator has an invalid value (6.5.3.2). |
| 128 | + |
| 129 | +— A pointer is converted to other than an integer or pointer type (6.5.4). |
| 130 | + |
| 131 | +— The value of the second operand of the / or % operator is zero (6.5.5). |
| 132 | + |
| 133 | +— Addition or subtraction of a pointer into, or just beyond, an array object and an |
| 134 | +integer type produces a result that does not point into, or just beyond, the same array |
| 135 | +object (6.5.6). |
| 136 | + |
| 137 | +— Addition or subtraction of a pointer into, or just beyond, an array object and an |
| 138 | +integer type produces a result that points just beyond the array object and is used as |
| 139 | +the operand of a unary * operator that is evaluated (6.5.6). |
| 140 | + |
| 141 | +— Pointers that do not point into, or just beyond, the same array object are subtracted |
| 142 | +(6.5.6). |
| 143 | + |
| 144 | +— An array subscript is out of range, even if an object is apparently accessible with the |
| 145 | +given subscript (as in the lvalue expression a[1][7] given the declaration int |
| 146 | +a[4][5]) (6.5.6). |
| 147 | + |
| 148 | +— The result of subtracting two pointers is not representable in an object of type |
| 149 | +ptrdiff_t (6.5.6). |
| 150 | + |
| 151 | +— An expression is shifted by a negative number or by an amount greater than or equal |
| 152 | +to the width of the promoted expression (6.5.7). |
| 153 | + |
| 154 | +— An expression having signed promoted type is left-shifted and either the value of the |
| 155 | +expression is negative or the result of shifting would be not be representable in the |
| 156 | +promoted type (6.5.7). |
| 157 | + |
| 158 | +— Pointers that do not point to the same aggregate or union (nor just beyond the same |
| 159 | +array object) are compared using relational operators (6.5.8). |
| 160 | + |
| 161 | +— An object is assigned to an inexactly overlapping object or to an exactly overlapping |
| 162 | +object with incompatible type (6.5.16.1). |
| 163 | + |
| 164 | +— An expression that is required to be an integer constant expression does not have an |
| 165 | +integer type; has operands that are not integer constants, enumeration constants, |
| 166 | +character constants, sizeof expressions whose results are integer constants, |
| 167 | +_Alignof expressions, or immediately-cast floating constants; or contains casts |
| 168 | +(outside operands to sizeof and _Alignof operators) other than conversions of |
| 169 | +arithmetic types to integer types (6.6). |
| 170 | + |
| 171 | +— A constant expression in an initializer is not, or does not evaluate to, one of the |
| 172 | +following: an arithmetic constant expression, a null pointer constant, an address |
| 173 | +constant, or an address constant for a complete object type plus or minus an integer |
| 174 | +constant expression (6.6). |
| 175 | + |
| 176 | +— An arithmetic constant expression does not have arithmetic type; has operands that |
| 177 | +are not integer constants, floating constants, enumeration constants, character |
| 178 | +constants, sizeof expressions whose results are integer constants, or _Alignof |
| 179 | +expressions; or contains casts (outside operands to sizeof or _Alignof operators) |
| 180 | +other than conversions of arithmetic types to arithmetic types (6.6). |
| 181 | + |
| 182 | +— The value of an object is accessed by an array-subscript [], member-access . or −>, |
| 183 | +address &, or indirection * operator or a pointer cast in creating an address constant |
| 184 | +(6.6). |
| 185 | + |
| 186 | +— An identifier for an object is declared with no linkage and the type of the object is |
| 187 | +incomplete after its declarator, or after its init-declarator if it has an initializer (6.7). |
| 188 | + |
| 189 | +— A function is declared at block scope with an explicit storage-class specifier other |
| 190 | +than extern (6.7.1). |
| 191 | + |
| 192 | +— A structure or union is defined without any named members (including those |
| 193 | +specified indirectly via anonymous structures and unions) (6.7.2.1). |
| 194 | + |
| 195 | +— An attempt is made to access, or generate a pointer to just past, a flexible array |
| 196 | +member of a structure when the referenced object provides no elements for that array |
| 197 | +(6.7.2.1). |
| 198 | + |
| 199 | +— When the complete type is needed, an incomplete structure or union type is not |
| 200 | +completed in the same scope by another declaration of the tag that defines the content |
| 201 | +(6.7.2.3). |
| 202 | + |
| 203 | +— An attempt is made to modify an object defined with a const-qualified type through |
| 204 | +use of an lvalue with non-const-qualified type (6.7.3). |
| 205 | + |
| 206 | +— An attempt is made to refer to an object defined with a volatile-qualified type through |
| 207 | +use of an lvalue with non-volatile-qualified type (6.7.3). |
| 208 | + |
| 209 | +— The specification of a function type includes any type qualifiers (6.7.3). |
| 210 | + |
| 211 | +— Two qualified types that are required to be compatible do not have the identically |
| 212 | +qualified version of a compatible type (6.7.3). |
| 213 | + |
| 214 | +— An object which has been modified is accessed through a restrict-qualified pointer to |
| 215 | +a const-qualified type, or through a restrict-qualified pointer and another pointer that |
| 216 | +are not both based on the same object (6.7.3.1). |
| 217 | + |
| 218 | +— A restrict-qualified pointer is assigned a value based on another restricted pointer |
| 219 | +whose associated block neither began execution before the block associated with this |
| 220 | +pointer, nor ended before the assignment (6.7.3.1). |
| 221 | + |
| 222 | +— A function with external linkage is declared with an inline function specifier, but is |
| 223 | +not also defined in the same translation unit (6.7.4). |
| 224 | + |
| 225 | +— A function declared with a _Noreturn function specifier returns to its caller (6.7.4). |
| 226 | + |
| 227 | +— The definition of an object has an alignment specifier and another declaration of that |
| 228 | +object has a different alignment specifier (6.7.5). |
| 229 | + |
| 230 | +— Declarations of an object in different translation units have different alignment |
| 231 | +specifiers (6.7.5). |
| 232 | + |
| 233 | +— Two pointer types that are required to be compatible are not identically qualified, or |
| 234 | +are not pointers to compatible types (6.7.6.1). |
| 235 | + |
| 236 | +— The size expression in an array declaration is not a constant expression and evaluates |
| 237 | +at program execution time to a nonpositive value (6.7.6.2). |
| 238 | + |
| 239 | +— In a context requiring two array types to be compatible, they do not have compatible |
| 240 | +element types, or their size specifiers evaluate to unequal values (6.7.6.2). |
| 241 | + |
| 242 | +— A declaration of an array parameter includes the keyword static within the [ and |
| 243 | +] and the corresponding argument does not provide access to the first element of an |
| 244 | +array with at least the specified number of elements (6.7.6.3). |
| 245 | + |
| 246 | +— A storage-class specifier or type qualifier modifies the keyword void as a function |
| 247 | +parameter type list (6.7.6.3). |
| 248 | + |
| 249 | +— In a context requiring two function types to be compatible, they do not have |
| 250 | +compatible return types, or their parameters disagree in use of the ellipsis terminator |
| 251 | +or the number and type of parameters (after default argument promotion, when there |
| 252 | +is no parameter type list or when one type is specified by a function definition with an |
| 253 | +identifier list) (6.7.6.3). |
| 254 | + |
| 255 | +— The value of an unnamed member of a structure or union is used (6.7.9). |
| 256 | + |
| 257 | +— The initializer for a scalar is neither a single expression nor a single expression |
| 258 | +enclosed in braces (6.7.9). |
| 259 | + |
| 260 | +— The initializer for a structure or union object that has automatic storage duration is |
| 261 | +neither an initializer list nor a single expression that has compatible structure or union |
| 262 | +type (6.7.9). |
| 263 | + |
| 264 | +— The initializer for an aggregate or union, other than an array initialized by a string |
| 265 | +literal, is not a brace-enclosed list of initializers for its elements or members (6.7.9). |
| 266 | + |
| 267 | +— An identifier with external linkage is used, but in the program there does not exist |
| 268 | +exactly one external definition for the identifier, or the identifier is not used and there |
| 269 | +exist multiple external definitions for the identifier (6.9). |
| 270 | + |
| 271 | +— A function definition includes an identifier list, but the types of the parameters are not |
| 272 | +declared in a following declaration list (6.9.1). |
| 273 | + |
| 274 | +— An adjusted parameter type in a function definition is not a complete object type |
| 275 | +(6.9.1). |
| 276 | + |
| 277 | +— A function that accepts a variable number of arguments is defined without a |
| 278 | +parameter type list that ends with the ellipsis notation (6.9.1). |
| 279 | + |
| 280 | +— The } that terminates a function is reached, and the value of the function call is used |
| 281 | +by the caller (6.9.1). |
| 282 | + |
| 283 | +— An identifier for an object with internal linkage and an incomplete type is declared |
| 284 | +with a tentative definition (6.9.2). |
| 285 | + |
| 286 | +— The token defined is generated during the expansion of a #if or #elif |
| 287 | +preprocessing directive, or the use of the defined unary operator does not match |
| 288 | +one of the two specified forms prior to macro replacement (6.10.1). |
| 289 | + |
| 290 | +— The #include preprocessing directive that results after expansion does not match |
| 291 | +one of the two header name forms (6.10.2). |
| 292 | + |
| 293 | +— The character sequence in an #include preprocessing directive does not start with a |
| 294 | +letter (6.10.2). |
| 295 | + |
| 296 | +— There are sequences of preprocessing tokens within the list of macro arguments that |
| 297 | +would otherwise act as preprocessing directives (6.10.3). |
| 298 | + |
| 299 | +— The result of the preprocessing operator # is not a valid character string literal |
| 300 | +(6.10.3.2). |
| 301 | + |
| 302 | +— The result of the preprocessing operator ## is not a valid preprocessing token |
| 303 | +(6.10.3.3). |
| 304 | + |
| 305 | +— The #line preprocessing directive that results after expansion does not match one of |
| 306 | +the two well-defined forms, or its digit sequence specifies zero or a number greater |
| 307 | +than 2147483647 (6.10.4). |
| 308 | + |
| 309 | +— A non-STDC #pragma preprocessing directive that is documented as causing |
| 310 | +translation failure or some other form of undefined behavior is encountered (6.10.6). |
| 311 | + |
| 312 | +— A #pragma STDC preprocessing directive does not match one of the well-defined |
| 313 | +forms (6.10.6). |
| 314 | + |
| 315 | +— The name of a predefined macro, or the identifier defined, is the subject of a |
| 316 | +#define or #undef preprocessing directive (6.10.8). |
| 317 | + |
| 318 | +— An attempt is made to copy an object to an overlapping object by use of a library |
| 319 | +function, other than as explicitly allowed (e.g., memmove) (clause 7). |
| 320 | + |
| 321 | +— A file with the same name as one of the standard headers, not provided as part of the |
| 322 | +implementation, is placed in any of the standard places that are searched for included |
| 323 | +source files (7.1.2). |
| 324 | + |
| 325 | +— A header is included within an external declaration or definition (7.1.2). |
| 326 | + |
| 327 | +— A function, object, type, or macro that is specified as being declared or defined by |
| 328 | +some standard header is used before any header that declares or defines it is included |
| 329 | +(7.1.2). |
| 330 | + |
| 331 | +— A standard header is included while a macro is defined with the same name as a |
| 332 | +keyword (7.1.2). |
| 333 | + |
| 334 | +— The program attempts to declare a library function itself, rather than via a standard |
| 335 | +header, but the declaration does not have external linkage (7.1.2). |
| 336 | + |
| 337 | +— The program declares or defines a reserved identifier, other than as allowed by 7.1.4 |
| 338 | +(7.1.3). |
| 339 | + |
| 340 | +— The program removes the definition of a macro whose name begins with an |
| 341 | +underscore and either an uppercase letter or another underscore (7.1.3). |
| 342 | + |
| 343 | +— An argument to a library function has an invalid value or a type not expected by a |
| 344 | +function with variable number of arguments (7.1.4). |
| 345 | + |
| 346 | +— The pointer passed to a library function array parameter does not have a value such |
| 347 | +that all address computations and object accesses are valid (7.1.4). |
| 348 | + |
| 349 | +— The macro definition of assert is suppressed in order to access an actual function |
| 350 | +(7.2). |
| 351 | + |
| 352 | +— The argument to the assert macro does not have a scalar type (7.2). |
| 353 | + |
| 354 | +— The CX_LIMITED_RANGE, FENV_ACCESS, or FP_CONTRACT pragma is used in |
| 355 | +any context other than outside all external declarations or preceding all explicit |
| 356 | +declarations and statements inside a compound statement (7.3.4, 7.6.1, 7.12.2). |
| 357 | + |
| 358 | +— The value of an argument to a character handling function is neither equal to the value |
| 359 | +of EOF nor representable as an unsigned char (7.4). |
| 360 | + |
| 361 | +— A macro definition of errno is suppressed in order to access an actual object, or the |
| 362 | +program defines an identifier with the name errno (7.5). |
| 363 | + |
| 364 | +— Part of the program tests floating-point status flags, sets floating-point control modes, |
| 365 | +or runs under non-default mode settings, but was translated with the state for the |
| 366 | +FENV_ACCESS pragma ‘‘off’’ (7.6.1). |
| 367 | + |
| 368 | +— The exception-mask argument for one of the functions that provide access to the |
| 369 | +floating-point status flags has a nonzero value not obtained by bitwise OR of the |
| 370 | +floating-point exception macros (7.6.2). |
| 371 | + |
| 372 | +— The fesetexceptflag function is used to set floating-point status flags that were |
| 373 | +not specified in the call to the fegetexceptflag function that provided the value |
| 374 | +of the corresponding fexcept_t object (7.6.2.4). |
| 375 | + |
| 376 | +— The argument to fesetenv or feupdateenv is neither an object set by a call to |
| 377 | +fegetenv or feholdexcept, nor is it an environment macro (7.6.4.3, 7.6.4.4). |
| 378 | + |
| 379 | +— The value of the result of an integer arithmetic or conversion function cannot be |
| 380 | +represented (7.8.2.1, 7.8.2.2, 7.8.2.3, 7.8.2.4, 7.22.6.1, 7.22.6.2, 7.22.1). |
| 381 | + |
| 382 | +— The program modifies the string pointed to by the value returned by the setlocale |
| 383 | +function (7.11.1.1). |
| 384 | + |
| 385 | +— The program modifies the structure pointed to by the value returned by the |
| 386 | +localeconv function (7.11.2.1). |
| 387 | + |
| 388 | +— A macro definition of math_errhandling is suppressed or the program defines |
| 389 | +an identifier with the name math_errhandling (7.12). |
| 390 | + |
| 391 | +— An argument to a floating-point classification or comparison macro is not of real |
| 392 | +floating type (7.12.3, 7.12.14). |
| 393 | + |
| 394 | +— A macro definition of setjmp is suppressed in order to access an actual function, or |
| 395 | +the program defines an external identifier with the name setjmp (7.13). |
| 396 | + |
| 397 | +— An invocation of the setjmp macro occurs other than in an allowed context |
| 398 | +(7.13.2.1). |
| 399 | + |
| 400 | +— The longjmp function is invoked to restore a nonexistent environment (7.13.2.1). |
| 401 | + |
| 402 | +— After a longjmp, there is an attempt to access the value of an object of automatic |
| 403 | +storage duration that does not have volatile-qualified type, local to the function |
| 404 | +containing the invocation of the corresponding setjmp macro, that was changed |
| 405 | +between the setjmp invocation and longjmp call (7.13.2.1). |
| 406 | + |
| 407 | +— The program specifies an invalid pointer to a signal handler function (7.14.1.1). |
| 408 | + |
| 409 | +— A signal handler returns when the signal corresponded to a computational exception |
| 410 | +(7.14.1.1). |
| 411 | + |
| 412 | +— A signal handler called in response to SIGFPE, SIGILL, SIGSEGV, or any other |
| 413 | +implementation-defined value corresponding to a computational exception returns |
| 414 | +(7.14.1.1). |
| 415 | + |
| 416 | +— A signal occurs as the result of calling the abort or raise function, and the signal |
| 417 | +handler calls the raise function (7.14.1.1). |
| 418 | + |
| 419 | +— A signal occurs other than as the result of calling the abort or raise function, and |
| 420 | +the signal handler refers to an object with static or thread storage duration that is not a |
| 421 | +lock-free atomic object other than by assigning a value to an object declared as |
| 422 | +volatile sig_atomic_t, or calls any function in the standard library other |
| 423 | +than the abort function, the _Exit function, the quick_exit function, or the |
| 424 | +signal function (for the same signal number) (7.14.1.1). |
| 425 | + |
| 426 | +— The value of errno is referred to after a signal occurred other than as the result of |
| 427 | +calling the abort or raise function and the corresponding signal handler obtained |
| 428 | +a SIG_ERR return from a call to the signal function (7.14.1.1). |
| 429 | + |
| 430 | +— A signal is generated by an asynchronous signal handler (7.14.1.1). |
| 431 | + |
| 432 | +— The signal function is used in a multi-threaded program (7.14.1.1). |
| 433 | + |
| 434 | +— A function with a variable number of arguments attempts to access its varying |
| 435 | +arguments other than through a properly declared and initialized va_list object, or |
| 436 | +before the va_start macro is invoked (7.16, 7.16.1.1, 7.16.1.4). |
| 437 | + |
| 438 | +— The macro va_arg is invoked using the parameter ap that was passed to a function |
| 439 | +that invoked the macro va_arg with the same parameter (7.16). |
| 440 | + |
| 441 | +— A macro definition of va_start, va_arg, va_copy, or va_end is suppressed in |
| 442 | +order to access an actual function, or the program defines an external identifier with |
| 443 | +the name va_copy or va_end (7.16.1). |
| 444 | + |
| 445 | +— The va_start or va_copy macro is invoked without a corresponding invocation |
| 446 | +of the va_end macro in the same function, or vice versa (7.16.1, 7.16.1.2, 7.16.1.3, |
| 447 | +7.16.1.4). |
| 448 | + |
| 449 | +— The type parameter to the va_arg macro is not such that a pointer to an object of |
| 450 | +that type can be obtained simply by postfixing a * (7.16.1.1). |
| 451 | + |
| 452 | +— The va_arg macro is invoked when there is no actual next argument, or with a |
| 453 | +specified type that is not compatible with the promoted type of the actual next |
| 454 | +argument, with certain exceptions (7.16.1.1). |
| 455 | + |
| 456 | +— The va_copy or va_start macro is called to initialize a va_list that was |
| 457 | +previously initialized by either macro without an intervening invocation of the |
| 458 | +va_end macro for the same va_list (7.16.1.2, 7.16.1.4). |
| 459 | + |
| 460 | +— The parameter parmN of a va_start macro is declared with the register |
| 461 | +storage class, with a function or array type, or with a type that is not compatible with |
| 462 | +the type that results after application of the default argument promotions (7.16.1.4). |
| 463 | + |
| 464 | +— The member designator parameter of an offsetof macro is an invalid right |
| 465 | +operand of the . operator for the type parameter, or designates a bit-field (7.19). |
| 466 | + |
| 467 | +— The argument in an instance of one of the integer-constant macros is not a decimal, |
| 468 | +octal, or hexadecimal constant, or it has a value that exceeds the limits for the |
| 469 | +corresponding type (7.20.4). |
| 470 | + |
| 471 | +— A byte input/output function is applied to a wide-oriented stream, or a wide character |
| 472 | +input/output function is applied to a byte-oriented stream (7.21.2). |
| 473 | + |
| 474 | +— Use is made of any portion of a file beyond the most recent wide character written to |
| 475 | +a wide-oriented stream (7.21.2). |
| 476 | + |
| 477 | +— The value of a pointer to a FILE object is used after the associated file is closed |
| 478 | +(7.21.3). |
| 479 | + |
| 480 | +— The stream for the fflush function points to an input stream or to an update stream |
| 481 | +in which the most recent operation was input (7.21.5.2). |
| 482 | + |
| 483 | +— The string pointed to by the mode argument in a call to the fopen function does not |
| 484 | +exactly match one of the specified character sequences (7.21.5.3). |
| 485 | + |
| 486 | +— An output operation on an update stream is followed by an input operation without an |
| 487 | +intervening call to the fflush function or a file positioning function, or an input |
| 488 | +operation on an update stream is followed by an output operation with an intervening |
| 489 | +call to a file positioning function (7.21.5.3). |
| 490 | + |
| 491 | +— An attempt is made to use the contents of the array that was supplied in a call to the |
| 492 | +setvbuf function (7.21.5.6). |
| 493 | + |
| 494 | +— There are insufficient arguments for the format in a call to one of the formatted |
| 495 | +input/output functions, or an argument does not have an appropriate type (7.21.6.1, |
| 496 | +7.21.6.2, 7.29.2.1, 7.29.2.2). |
| 497 | + |
| 498 | +— The format in a call to one of the formatted input/output functions or to the |
| 499 | +strftime or wcsftime function is not a valid multibyte character sequence that |
| 500 | +begins and ends in its initial shift state (7.21.6.1, 7.21.6.2, 7.27.3.5, 7.29.2.1, 7.29.2.2, |
| 501 | +7.29.5.1). |
| 502 | + |
| 503 | +— In a call to one of the formatted output functions, a precision appears with a |
| 504 | +conversion specifier other than those described (7.21.6.1, 7.29.2.1). |
| 505 | + |
| 506 | +— A conversion specification for a formatted output function uses an asterisk to denote |
| 507 | +an argument-supplied field width or precision, but the corresponding argument is not |
| 508 | +provided (7.21.6.1, 7.29.2.1). |
| 509 | + |
| 510 | +— A conversion specification for a formatted output function uses a # or 0 flag with a |
| 511 | +conversion specifier other than those described (7.21.6.1, 7.29.2.1). |
| 512 | + |
| 513 | +— A conversion specification for one of the formatted input/output functions uses a |
| 514 | +length modifier with a conversion specifier other than those described (7.21.6.1, |
| 515 | +7.21.6.2, 7.29.2.1, 7.29.2.2). |
| 516 | + |
| 517 | +— An s conversion specifier is encountered by one of the formatted output functions, |
| 518 | +and the argument is missing the null terminator (unless a precision is specified that |
| 519 | +does not require null termination) (7.21.6.1, 7.29.2.1). |
| 520 | + |
| 521 | +— An n conversion specification for one of the formatted input/output functions includes |
| 522 | +any flags, an assignment-suppressing character, a field width, or a precision (7.21.6.1, |
| 523 | +7.21.6.2, 7.29.2.1, 7.29.2.2). |
| 524 | + |
| 525 | +— A % conversion specifier is encountered by one of the formatted input/output |
| 526 | +functions, but the complete conversion specification is not exactly %% (7.21.6.1, |
| 527 | +7.21.6.2, 7.29.2.1, 7.29.2.2). |
| 528 | + |
| 529 | +— An invalid conversion specification is found in the format for one of the formatted |
| 530 | +input/output functions, or the strftime or wcsftime function (7.21.6.1, 7.21.6.2, |
| 531 | +7.27.3.5, 7.29.2.1, 7.29.2.2, 7.29.5.1). |
| 532 | + |
| 533 | +— The number of characters or wide characters transmitted by a formatted output |
| 534 | +function (or written to an array, or that would have been written to an array) is greater |
| 535 | +than INT_MAX (7.21.6.1, 7.29.2.1). |
| 536 | + |
| 537 | +— The number of input items assigned by a formatted input function is greater than |
| 538 | +INT_MAX (7.21.6.2, 7.29.2.2). |
| 539 | + |
| 540 | +— The result of a conversion by one of the formatted input functions cannot be |
| 541 | +represented in the corresponding object, or the receiving object does not have an |
| 542 | +appropriate type (7.21.6.2, 7.29.2.2). |
| 543 | + |
| 544 | +— A c, s, or [ conversion specifier is encountered by one of the formatted input |
| 545 | +functions, and the array pointed to by the corresponding argument is not large enough |
| 546 | +to accept the input sequence (and a null terminator if the conversion specifier is s or |
| 547 | +[) (7.21.6.2, 7.29.2.2). |
| 548 | + |
| 549 | +— A c, s, or [ conversion specifier with an l qualifier is encountered by one of the |
| 550 | +formatted input functions, but the input is not a valid multibyte character sequence |
| 551 | +that begins in the initial shift state (7.21.6.2, 7.29.2.2). |
| 552 | + |
| 553 | +— The input item for a %p conversion by one of the formatted input functions is not a |
| 554 | +value converted earlier during the same program execution (7.21.6.2, 7.29.2.2). |
| 555 | + |
| 556 | +— The vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf, |
| 557 | +vsscanf, vfwprintf, vfwscanf, vswprintf, vswscanf, vwprintf, or |
| 558 | +vwscanf function is called with an improperly initialized va_list argument, or |
| 559 | +the argument is used (other than in an invocation of va_end) after the function |
| 560 | +returns (7.21.6.8, 7.21.6.9, 7.21.6.10, 7.21.6.11, 7.21.6.12, 7.21.6.13, 7.21.6.14, |
| 561 | +7.29.2.5, 7.29.2.6, 7.29.2.7, 7.29.2.8, 7.29.2.9, 7.29.2.10). |
| 562 | + |
| 563 | +— The contents of the array supplied in a call to the fgets or fgetws function are |
| 564 | +used after a read error occurred (7.21.7.2, 7.29.3.2). |
| 565 | + |
| 566 | +— The file position indicator for a binary stream is used after a call to the ungetc |
| 567 | +function where its value was zero before the call (7.21.7.10). |
| 568 | + |
| 569 | +— The file position indicator for a stream is used after an error occurred during a call to |
| 570 | +the fread or fwrite function (7.21.8.1, 7.21.8.2). |
| 571 | + |
| 572 | +— A partial element read by a call to the fread function is used (7.21.8.1). |
| 573 | + |
| 574 | +— The fseek function is called for a text stream with a nonzero offset and either the |
| 575 | +offset was not returned by a previous successful call to the ftell function on a |
| 576 | +stream associated with the same file or whence is not SEEK_SET (7.21.9.2). |
| 577 | + |
| 578 | +— The fsetpos function is called to set a position that was not returned by a previous |
| 579 | +successful call to the fgetpos function on a stream associated with the same file |
| 580 | +(7.21.9.3). |
| 581 | + |
| 582 | +— A non-null pointer returned by a call to the calloc, malloc, or realloc function |
| 583 | +with a zero requested size is used to access an object (7.22.3). |
| 584 | + |
| 585 | +— The value of a pointer that refers to space deallocated by a call to the free or |
| 586 | +realloc function is used (7.22.3). |
| 587 | + |
| 588 | +— The alignment requested of the aligned_alloc function is not valid or not |
| 589 | +supported by the implementation, or the size requested is not an integral multiple of |
| 590 | +the alignment (7.22.3.1). |
| 591 | + |
| 592 | +— The pointer argument to the free or realloc function does not match a pointer |
| 593 | +earlier returned by a memory management function, or the space has been deallocated |
| 594 | +by a call to free or realloc (7.22.3.3, 7.22.3.5). |
| 595 | + |
| 596 | +— The value of the object allocated by the malloc function is used (7.22.3.4). |
| 597 | + |
| 598 | +— The value of any bytes in a new object allocated by the realloc function beyond |
| 599 | +the size of the old object are used (7.22.3.5). |
| 600 | + |
| 601 | +— The program calls the exit or quick_exit function more than once, or calls both |
| 602 | +functions (7.22.4.4, 7.22.4.7). |
| 603 | + |
| 604 | +— During the call to a function registered with the atexit or at_quick_exit |
| 605 | +function, a call is made to the longjmp function that would terminate the call to the |
| 606 | +registered function (7.22.4.4, 7.22.4.7). |
| 607 | + |
| 608 | +— The string set up by the getenv or strerror function is modified by the program |
| 609 | +(7.22.4.6, 7.24.6.2). |
| 610 | + |
| 611 | +— A signal is raised while the quick_exit function is executing (7.22.4.7). |
| 612 | + |
| 613 | +— A command is executed through the system function in a way that is documented as |
| 614 | +causing termination or some other form of undefined behavior (7.22.4.8). |
| 615 | + |
| 616 | +— A searching or sorting utility function is called with an invalid pointer argument, even |
| 617 | +if the number of elements is zero (7.22.5). |
| 618 | + |
| 619 | +— The comparison function called by a searching or sorting utility function alters the |
| 620 | +contents of the array being searched or sorted, or returns ordering values |
| 621 | +inconsistently (7.22.5). |
| 622 | + |
| 623 | +— The array being searched by the bsearch function does not have its elements in |
| 624 | +proper order (7.22.5.1). |
| 625 | + |
| 626 | +— The current conversion state is used by a multibyte/wide character conversion |
| 627 | +function after changing the LC_CTYPE category (7.22.7). |
| 628 | + |
| 629 | +— A string or wide string utility function is instructed to access an array beyond the end |
| 630 | +of an object (7.24.1, 7.29.4). |
| 631 | + |
| 632 | +— A string or wide string utility function is called with an invalid pointer argument, even |
| 633 | +if the length is zero (7.24.1, 7.29.4). |
| 634 | + |
| 635 | +— The contents of the destination array are used after a call to the strxfrm, |
| 636 | +strftime, wcsxfrm, or wcsftime function in which the specified length was |
| 637 | +too small to hold the entire null-terminated result (7.24.4.5, 7.27.3.5, 7.29.4.4.4, |
| 638 | +7.29.5.1). |
| 639 | + |
| 640 | +— The first argument in the very first call to the strtok or wcstok is a null pointer |
| 641 | +(7.24.5.8, 7.29.4.5.7). |
| 642 | + |
| 643 | +— The type of an argument to a type-generic macro is not compatible with the type of |
| 644 | +the corresponding parameter of the selected function (7.25). |
| 645 | + |
| 646 | +— A complex argument is supplied for a generic parameter of a type-generic macro that |
| 647 | +has no corresponding complex function (7.25). |
| 648 | + |
| 649 | +— At least one member of the broken-down time passed to asctime contains a value |
| 650 | +outside its normal range, or the calculated year exceeds four digits or is less than the |
| 651 | +year 1000 (7.27.3.1). |
| 652 | + |
| 653 | +— The argument corresponding to an s specifier without an l qualifier in a call to the |
| 654 | +fwprintf function does not point to a valid multibyte character sequence that |
| 655 | +begins in the initial shift state (7.29.2.11). |
| 656 | + |
| 657 | +— In a call to the wcstok function, the object pointed to by ptr does not have the |
| 658 | +value stored by the previous call for the same wide string (7.29.4.5.7). |
| 659 | + |
| 660 | +— An mbstate_t object is used inappropriately (7.29.6). |
| 661 | + |
| 662 | +— The value of an argument of type wint_t to a wide character classification or case |
| 663 | +mapping function is neither equal to the value of WEOF nor representable as a |
| 664 | +wchar_t (7.30.1). |
| 665 | + |
| 666 | +— The iswctype function is called using a different LC_CTYPE category from the |
| 667 | +one in effect for the call to the wctype function that returned the description |
| 668 | +(7.30.2.2.1). |
| 669 | + |
| 670 | +— The towctrans function is called using a different LC_CTYPE category from the |
| 671 | +one in effect for the call to the wctrans function that returned the description |
| 672 | +(7.30.3.2.1). |
0 commit comments