CertC-INTΒΆ

Integers

Nested Rules

CertC-INT00

Understand the data model used by your implementation(s)

CertC-INT01

Use rsize_t or size_t for all integer values representing the size of an object

CertC-INT02

Understand integer conversion rules

CertC-INT05

Do not use input functions to convert character data if they cannot handle all possible inputs

CertC-INT07

Use only explicitly signed or unsigned char type for numeric values

CertC-INT08

Verify that all integer values are in range

CertC-INT09

Ensure enumeration constants map to unique values

CertC-INT12

Do not make assumptions about the type of a plain int bit-field when used in an expression

CertC-INT13

Use bitwise operators only on unsigned operands

CertC-INT15

Use intmax_t or uintmax_t for formatted IO on programmer-defined integer types

CertC-INT17

Define integer constants in an implementation-independent manner

CertC-INT30

Ensure that unsigned integer operations do not wrap

CertC-INT31

Ensure that integer conversions do not result in lost or misinterpreted data

CertC-INT32

Ensure that operations on signed integers do not result in overflow

CertC-INT33

Ensure that division and remainder operations do not result in divide-by-zero errors

CertC-INT34

Do not shift an expression by a negative number of bits or by greater than or equal to the number of bits that exist in the operand

CertC-INT35

Use correct integer precisions

CertC-INT36

Converting a pointer to integer or integer to pointer

Options