Skip to main content

IAR Embedded Workbench for Arm 9.70.x

Summary of checks

In this section:

This table summarizes the C-STAT® checks.To see the reference information for a check, click the link in the table below or use the search function.

Check

Synopsis

ARR-inv-index-pos

An array access might be out of bounds, depending on which path is executed.

ARR-inv-index-ptr-pos

A pointer to an array is potentially used outside the array bounds.

ARR-inv-index-ptr

A pointer to an array is used outside the array bounds.

ARR-inv-index

An array access is out of bounds.

ARR-neg-index

An array is accessed with a negative subscript value.

ARR-uninit-index

An array is indexed with an uninitialized variable

ATH-cmp-float

Floating point comparisons using == or !=

ATH-cmp-unsign-neg

An unsigned value is compared to see whether it is negative.

ATH-cmp-unsign-pos

An unsigned value is compared to see whether it is greater than or equal to 0.

ATH-div-0-assign

A variable is assigned the value 0, then used as a divisor.

ATH-div-0-cmp-aft

After a successful comparison with 0, a variable is used as a divisor.

ATH-div-0-cmp-bef

A variable used as a divisor is afterwards compared with 0.

ATH-div-0-interval

Interval analysis has found a value that is 0 and used as a divisor.

ATH-div-0-pos

Interval analysis has found an expression that might be 0 and is used as a divisor.

ATH-div-0-unchk-global

A global variable is used as a divisor without having been determined to be non-zero.

ATH-div-0-unchk-local

A local variable is used as a divisor without having been determined to be non-zero.

ATH-div-0-unchk-param

A parameter is used as a divisor without having been determined to be non-zero.

ATH-div-0

An expression that results in 0 is used as a divisor.

ATH-inc-bool

Deprecated operation on bool.

ATH-malloc-overrun

The size of memory passed to malloc to allocate overflows.

ATH-neg-check-nonneg

A variable is checked for a non-negative value after being used, instead of before.

ATH-neg-check-pos

A variable is checked for a positive value after being used, instead of before.

ATH-new-overrun

An arithmetic overflow is caused by an allocation using new[].

ATH-overflow-cast

An expression is cast to a different type, resulting in an overflow or underflow of its value.

ATH-overflow

An expression is implicitly converted to a narrower type, resulting in an overflow or underflow of its value.

ATH-shift-bounds

Out of range shifts were found.

ATH-shift-neg

The left-hand side of a right shift operation might be a negative value.

ATH-sizeof-by-sizeof

Multiplying sizeof by sizeof.

CAST-old-style

Old style casts (other than void casts) are used

CATCH-object-slicing

Exception objects are caught by value

CATCH-xtor-bad-member

Exception handler in constructor or destructor accesses non-static member variable that might not exist.

COMMA-overload

Overloaded comma operator

COMMENT-nested

Appearances of /* inside comments

CONST-member-ret

A member function qualified as const returns a pointer member variable.

COP-alloc-ctor

A class member is deallocated in the class' destructor, but not allocated in a constructor or assignment operator.

COP-assign-op-ret

An assignment operator of a C++ class does not return a non-const reference to this.

COP-assign-op-self

Assignment operator does not check for self-assignment before allocating member functions

COP-assign-op

There is no assignment operator defined for a class whose destructor deallocates memory.

COP-copy-ctor

A class which uses dynamic memory allocation does not have a user-defined copy constructor.

COP-dealloc-dtor

A class member has memory allocated in a constructor or an assignment operator, that is not released in the destructor.

COP-dtor-throw

An exception is thrown, or might be thrown, in a class destructor.

COP-dtor

A class which dynamically allocates memory in its copy control functions does not have a destructor.

COP-init-order

Data members are initialized with other data members that are in the same initialization list.

COP-init-uninit

An initializer list reads the values of still uninitialized members.

COP-member-uninit

A member of a class is not initialized in one of the class constructors.

CPU-ctor-call-virt

A virtual member function is called in a class constructor.

CPU-ctor-implicit

Constructors that are callable with a single argument are not declared explicit. Conversion operators shall also be set explicit.

CPU-delete-throw

An exception is thrown, or might be thrown, in an overloaded delete or delete[] operator.

CPU-delete-void

A pointer to void is used in delete, causing the destructor not to be called.

CPU-dtor-call-virt

A virtual member function is called in a class destructor.

CPU-malloc-class

An allocation of a class instance with malloc() does not call a constructor.

CPU-nonvirt-dtor

A public non-virtual destructor is defined in a class with virtual methods.

CPU-return-ref-to-class-data

Member functions return non-const handles to members.

DECL-implicit-int

An object or function of the type int is declared or defined, but its type is not explicitly stated.

DEFINE-hash-multiple

Multiple # or ## operators in a macro definition.

ENUM-bounds

Conversions to enum that are out of range of the enumeration.

EXP-cond-assign

An assignment might be mistakenly used as the condition for an if, for, while, or do statement.

EXP-dangling-else

An else branch might be connected to an unexpected if statement.

EXP-loop-exit

An unconditional break, continue, return, or goto within a loop.

EXP-main-ret-int

The return type of main() is not int.

EXP-null-stmt

The body of an if, while, or for statement is a null statement.

EXP-stray-semicolon

Stray semicolons on the same line as other code

EXPR-const-overflow

A constant unsigned integer expression overflows.

FPT-cmp-null

The address of a function is compared with NULL.

FPT-literal

A function pointer that refers to a literal address is dereferenced.

FPT-misuse

A function pointer is used in an invalid context.

FUNC-implicit-decl

Functions are used without prototyping.

FUNC-unprototyped-all

Functions are declared with an empty () parameter list that does not form a valid prototype.

FUNC-unprototyped-used

Arguments are passed to functions without a valid prototype.

INCLUDE-c-file

A .c file includes one or more .c files.

INT-use-signed-as-unsigned-pos

A negative signed integer is implicitly cast to an unsigned integer.

INT-use-signed-as-unsigned

A negative signed integer is implicitly cast to an unsigned integer.

ITR-end-cmp-aft

An iterator is used, then compared with end()

ITR-end-cmp-bef

An iterator is compared with end() or rend(), then dereferenced.

ITR-invalidated

An iterator assigned to point into a container is used or dereferenced even though it might be invalidated.

ITR-mismatch-alg

A pair of iterators passed to an STL algorithm function point to different containers.

ITR-store

A container's begin() or end() iterator is stored and subsequently used.

ITR-uninit

An iterator is dereferenced or incremented before it is assigned to point into a container.

LIB-bsearch-overrun-pos

Arguments passed to bsearch might cause it to overrun.

LIB-bsearch-overrun

Arguments passed to bsearch cause it to overrun.

LIB-fn-unsafe

A potentially unsafe library function is used.

LIB-fread-overrun-pos

A call to fread might cause a buffer overrun.

LIB-fread-overrun

A call to fread causes a buffer overrun.

LIB-memchr-overrun-pos

A call to memchr might cause a buffer overrun.

LIB-memchr-overrun

A call to memchr causes a buffer overrun.

LIB-memcpy-overrun-pos

A call to memcpy might cause the memory to overrun.

LIB-memcpy-overrun

A call to memcpy or memmove causes the memory to overrun.

LIB-memset-overrun-pos

A call to memset might cause a buffer overrun.

LIB-memset-overrun

A call to memset causes a buffer overrun.

LIB-putenv

putenv used to set environment variable values.

LIB-qsort-overrun-pos

Arguments passed to qsort might cause it to overrun.

LIB-qsort-overrun

Arguments passed to qsort cause it to overrun.

LIB-return-const

The return value of a const standard library function is not used.

LIB-return-error

The return value for a library function that might return an error value is not used.

LIB-return-leak

The return values from one or more library functions were not stored, returned, or passed as a parameter.

LIB-return-neg

A variable assigned using a library function that can return -1 as an error value is subsequently used where the value must be non-negative.

LIB-return-null

A pointer is assigned using a library function that can return NULL as an error value. This pointer is subsequently dereferenced without checking its value.

LIB-sprintf-overrun

A call to sprintf causes a destination buffer overrun.

LIB-std-sort-overrun-pos

Using std::sort might cause buffer overrun.

LIB-std-sort-overrun

A buffer overrun is caused by use of std::sort.

LIB-strcat-overrun-pos

A call to strcat might cause destination buffer overrun.

LIB-strcat-overrun

A call to strcat causes a destination buffer overrun.

LIB-strcpy-overrun-pos

A call to strcpy might cause destination buffer overrun.

LIB-strcpy-overrun

A call to strcpy causes a destination buffer overrun.

LIB-strncat-overrun-pos

A call to strncat might cause a destination buffer overrun.

LIB-strncat-overrun

A call to strncat causes a destination buffer overrun.

LIB-strncmp-overrun-pos

A call to strncmp might cause a buffer overrun.

LIB-strncmp-overrun

A buffer overrun is caused by a call to strncmp.

LIB-strncpy-overrun-pos

A call to strncpy might cause a destination buffer overrun.

LIB-strncpy-overrun

A call to strncpy causes a destination buffer overrun.

LOGIC-overload

Overloaded && and || operators

MEM-delete-array-op

A memory location allocated with new is deleted with delete[]

MEM-delete-op

A memory location allocated with new [] is deleted with delete or free.

MEM-double-free-alias

Freeing a memory location more than once.

MEM-double-free-some

A memory location is freed more than once on some paths but not on others.

MEM-double-free

A memory location is freed more than once.

MEM-free-field

A struct or a class field is possibly freed.

MEM-free-fptr

A function pointer is deallocated.

MEM-free-no-alloc-struct

A struct field is deallocated without first having been allocated.

MEM-free-no-alloc

A pointer is freed without having been allocated.

MEM-free-no-use

Memory is allocated and then freed without being used.

MEM-free-op

Memory allocated with malloc deallocated using delete.

MEM-free-struct-field

A struct's field is deallocated, but is not dynamically allocated.

MEM-free-variable

A stack address might be freed.

MEM-leak-alias

Incorrect deallocation causes memory leak.

MEM-leak

Incorrect deallocation causes memory leak.

MEM-malloc-arith

An assignment contains both a malloc() and pointer arithmetic on the right-hand side.

MEM-malloc-diff-type

An allocation call tries to allocate memory based on a sizeof operator, but the destination type of the call is of a different type.

MEM-malloc-sizeof-ptr

malloc(sizeof(p)), where p is a pointer type, is assigned to a non-pointer variable.

MEM-malloc-sizeof

Allocating memory with malloc without using sizeof.

MEM-malloc-strlen

Dangerous arithmetic with strlen in argument to malloc.

MEM-realloc-diff-type

The type of the pointer that stores the result of realloc does not match the type of the first argument.

MEM-return-free

A function deallocates memory, then returns a pointer to that memory.

MEM-return-no-assign

A function that allocates memory's return value is not stored.

MEM-stack-global-field

A stack address is stored in the field of a global struct.

MEM-stack-global

A stack address is stored in a global pointer.

MEM-stack-param-ref

Stack address is stored via reference parameter.

MEM-stack-param

A stack address is stored outside a function via a parameter.

MEM-stack-pos

Might return address on the stack.

MEM-stack-ref

A stack object is returned from a function as a reference.

MEM-stack

Might return address on the stack.

MEM-use-free-all

A pointer is used after it has been freed.

MEM-use-free-some

A pointer is used after it has been freed.

PTR-arith-field

Direct access to a field of a struct, using an offset from the address of the struct.

PTR-arith-stack

Pointer arithmetic applied to a pointer that references a stack address

PTR-arith-var

Invalid pointer arithmetic with an automatic variable that is neither an array nor a pointer.

PTR-cmp-str-lit

A variable is tested for equality with a string literal.

PTR-null-assign-fun-pos

Possible NULL pointer dereferenced by a function.

PTR-null-assign-pos

A pointer is assigned a value that might be NULL, and then dereferenced.

PTR-null-assign

A pointer is assigned the value NULL, then dereferenced.

PTR-null-cmp-aft

A pointer is dereferenced, then compared with NULL.

PTR-null-cmp-bef-fun

A pointer is compared with NULL, then dereferenced by a function.

PTR-null-cmp-bef

A pointer is compared with NULL, then dereferenced.

PTR-null-fun-pos

A possible NULL pointer is returned from a function, and immediately dereferenced without checking.

PTR-null-literal-pos

A literal pointer expression (like NULL) is dereferenced by a function call.

PTR-overload

An & operator is overloaded.

PTR-singleton-arith-pos

Pointer arithmetic might be performed on a pointer that points to a single object.

PTR-singleton-arith

Pointer arithmetic is performed on a pointer that points to a single object.

PTR-unchk-param-some

A pointer is dereferenced after being determined not to be NULL on some paths, but not checked on others.

PTR-unchk-param

A pointer parameter is not compared to NULL

PTR-uninit-pos

Possible dereference of an uninitialized or NULL pointer.

PTR-uninit

Dereference of an uninitialized or NULL pointer.

RED-alloc-zero-bytes

Checks that an allocation does not allocate zero bytes

RED-case-reach

A case statement within a switch statement cannot be reached.

RED-cmp-always

A comparison using ==, <, <=, >, or >= is always true.

RED-cmp-never

A comparison using ==, <, <=, >, or >= is always false.

RED-cond-always

The condition in an if, for, while, do-while, or ternary operator will always be true.

RED-cond-const-assign

A constant assignment in a conditional expression.

RED-cond-const-expr

A conditional expression with a constant value

RED-cond-const

A constant value is used as the condition for a loop or if statement.

RED-cond-never

The condition in if, for, while, do-while, or ternary operator will never be true.

RED-dead

A part of the application is never executed.

RED-expr

Some expressions, such as x & x and x | x, are redundant.

RED-func-no-effect

A function is declared that has no return type and creates no side effects.

RED-local-hides-global

The definition of a local variable hides a global definition.

RED-local-hides-local

The definition of a local variable hides a previous local definition.

RED-local-hides-member

The definition of a local variable hides a member of the class.

RED-local-hides-param

A variable declaration hides a parameter of the function

RED-no-effect

A statement potentially contains no side effects.

RED-self-assign

In a C++ class member function, a variable is assigned to itself.

RED-unused-assign

A variable is assigned a non-trivial value that is never used.

RED-unused-enum-val

An enumerated value is not used. This is a link analysis check.

RED-unused-param

A function parameter is declared but not used.

RED-unused-return-val

There are unused function return values (other than overloaded operators).

RED-unused-val

A variable is assigned a value that is never used.

RED-unused-var-all

A variable is neither read nor written for any execution path.

RESOURCE-deref-file

A pointer to a FILE object is dereferenced.

RESOURCE-double-close

A file resource is closed multiple times

RESOURCE-file-no-close-all

A file pointer is never closed.

RESOURCE-file-pos-neg

A file handler might be negative

RESOURCE-file-use-after-close

A file resource is used after it has been closed.

RESOURCE-implicit-deref-file

A file pointer is implicitly dereferenced by a library function.

RESOURCE-write-ronly-file

A file opened as read-only is written to.

SIZEOF-side-effect

sizeof expressions containing side effects

SPC-order

Expressions that depend on order of evaluation were found.

SPC-uninit-arr-all

Reads from local buffers are not preceded by writes.

SPC-uninit-struct-field-heap

A field of a dynamically allocated struct is read before it is initialized.

SPC-uninit-struct-field

A field of a local struct is read before it is initialized.

SPC-uninit-var-all

A variable is read before it is assigned a value.

SPC-uninit-var-some

A variable is read before it is assigned a value.

SPC-volatile-reads

There are multiple read accesses with volatile-qualified type within one and the same sequence point.

SPC-volatile-writes

There are multiple write accesses with volatile-qualified type within one and the same sequence point.

STRUCT-signed-bit

There are signed single-bit fields (excluding anonymous fields).

SWITCH-fall-through

There are non-empty switch cases not terminated by break and without 'fallthrough' comment.

SWITCH-missing-enum-val

A switch case uses only a subset of an enumeration.

THROW-empty

Unsafe rethrow of exception.

THROW-main

No default exception handler for main.

THROW-null

Throw of NULL integer constant

THROW-ptr

Throw of exceptions by pointer

THROW-static

Exceptions thrown without a handler in some call paths that lead to that point.

THROW-unhandled

There are calls to functions explicitly declared to throw an exception type that is not handled (or declared as thrown) by the caller.

UNION-overlap-assign

Assignments from one field of a union to another.

UNION-type-punning

Writing to a field of a union after reading from a different field, effectively re-interpreting the bit pattern with a different type.

CERT-ARR30-C_a

Do not form or use out-of-bounds pointers or array subscripts.

CERT-ARR30-C_b

Do not form or use out-of-bounds pointers or array subscripts.

CERT-ARR30-C_c

Do not form or use out-of-bounds pointers or array subscripts.

CERT-ARR30-C_d

Do not form or use out-of-bounds pointers or array subscripts.

CERT-ARR30-C_e

Do not form or use out-of-bounds pointers or array subscripts.

CERT-ARR30-C_f

Do not form or use out-of-bounds pointers or array subscripts.

CERT-ARR30-C_g

Do not form or use out-of-bounds pointers or array subscripts.

CERT-ARR30-C_h

Do not form or use out-of-bounds pointers or array subscripts.

CERT-ARR30-C_i

Do not form or use out-of-bounds pointers or array subscripts.

CERT-ARR30-C_j

Do not form or use out-of-bounds pointers or array subscripts.

CERT-ARR32-C

Ensure size arguments for variable length arrays are in a valid range.

CERT-ARR36-C_a

Do not subtract two pointers that do not refer to the same array.

CERT-ARR36-C_b

Do not compare two pointers that do not refer to the same array.

CERT-ARR37-C

Do not add or subtract an integer to a pointer to a non-array object.

CERT-ARR38-C_a

Guarantee that library functions do not form invalid pointers.

CERT-ARR38-C_b

Guarantee that library functions do not form invalid pointers.

CERT-ARR38-C_c

Guarantee that library functions do not form invalid pointers.

CERT-ARR38-C_d

Guarantee that library functions do not form invalid pointers.

CERT-ARR38-C_e

Guarantee that library functions do not form invalid pointers.

CERT-ARR38-C_f

Guarantee that library functions do not form invalid pointers.

CERT-ARR39-C

Do not add or subtract a scaled integer to a pointer.

CERT-DCL04-C

Do not declare more than one variable per declaration.

CERT-DCL30-C_a

Declare objects with appropriate storage durations.

CERT-DCL30-C_b

Declare objects with appropriate storage durations.

CERT-DCL30-C_c

Declare objects with appropriate storage durations.

CERT-DCL30-C_d

Declare objects with appropriate storage durations.

CERT-DCL30-C_e

Declare objects with appropriate storage durations.

CERT-DCL31-C

Declare identifiers before using them.

CERT-DCL36-C

Do not declare an identifier with conflicting linkage classifications.

CERT-DCL37-C_a

Do not declare or define a reserved identifier

CERT-DCL37-C_b

Do not declare or define a reserved identifier

CERT-DCL37-C_c

Do not declare or define a reserved identifier

CERT-DCL38-C

Use the correct syntax when declaring a flexible array member.

CERT-DCL39-C

Avoid information leakage when passing a structure across a trust boundary.

CERT-DCL40-C

Do not create incompatible declarations of the same function or object. This is a link analysis check.

CERT-DCL41-C

Do not declare variables inside a switch statement before the first case label

CERT-ENV30-C

Do not modify the object referenced by the return value of certain functions.

CERT-ENV31-C

Do not rely on an environment pointer following an operation that may invalidate it

CERT-ENV32-C

All exit handlers must return normally

CERT-ENV33-C

Do not call system().

CERT-ENV34-C

Do not store pointers returned by certain functions.

CERT-ERR30-C_a

Set errno to zero before calling a library function known to set errno.

CERT-ERR30-C_b

Check errno only after the function returns a value indicating failure.

CERT-ERR30-C_c

Check errno only after the function called is an errno-setting function.

CERT-ERR30-C_d

Check return of errno setting functions for values indicating failure.

CERT-ERR30-C_e

Only check errno when neccessary.

CERT-ERR32-C

Do not rely on indeterminate values of errno.

CERT-ERR33-C_a

Detect and handle standard library errors.

CERT-ERR33-C_b

Detect and handle standard library errors.

CERT-ERR33-C_c

Detect and handle standard library errors.

CERT-ERR33-C_d

Detect and handle standard library errors.

CERT-ERR34-C_a

Detect errors when converting a string to a number.

CERT-ERR34-C_b

Detect errors when converting a string to a number.

CERT-EXP19-C

No braces for the body of an if, for, or while statement

CERT-EXP30-C_a

Do not depend on the order of evaluation for side effects.

CERT-EXP30-C_b

Do not depend on the order of evaluation for side effects.

CERT-EXP32-C

Do not access a volatile object through a nonvolatile reference.

CERT-EXP33-C_a

Do not read uninitialized memory.

CERT-EXP33-C_b

Do not read uninitialized memory.

CERT-EXP33-C_c

Do not read uninitialized memory.

CERT-EXP33-C_d

Do not read uninitialized memory.

CERT-EXP33-C_e

Do not read uninitialized memory.

CERT-EXP34-C_a

Do not dereference null pointers.

CERT-EXP34-C_b

Do not dereference null pointers.

CERT-EXP34-C_c

Do not dereference null pointers.

CERT-EXP34-C_d

Do not dereference null pointers.

CERT-EXP34-C_e

Do not dereference null pointers.

CERT-EXP34-C_f

Do not dereference null pointers.

CERT-EXP34-C_g

Do not dereference null pointers.

CERT-EXP35-C

Do not modify objects with temporary lifetime

CERT-EXP36-C_a

Do not cast pointers into more strictly aligned pointer types.

CERT-EXP36-C_b

Do not cast pointers into more strictly aligned pointer types.

CERT-EXP37-C_a

Call functions with the correct number and type of arguments.

CERT-EXP37-C_b

Call functions with the correct number and type of arguments. This is a link analysis check.

CERT-EXP37-C_c

Call functions with the correct number and type of arguments.

CERT-EXP39-C_a

Do not access a variable through a pointer of an incompatible type.

CERT-EXP39-C_b

Do not access a variable through a pointer of an incompatible type.

CERT-EXP39-C_c

Do not access a variable through a pointer of an incompatible type.

CERT-EXP39-C_d

Do not access a variable through a pointer of an incompatible type.

CERT-EXP39-C_e

Do not access a variable through a pointer of an incompatible type.

CERT-EXP40-C_a

Do not modify constant objects.

CERT-EXP40-C_b

Do not modify constant objects.

CERT-EXP42-C

Do not compare padding data.

CERT-EXP43-C_a

Avoid undefined behavior when using restrict-qualified pointers.

CERT-EXP43-C_b

Avoid undefined behavior when using restrict-qualified pointers.

CERT-EXP43-C_c

Avoid undefined behavior when using restrict-qualified pointers.

CERT-EXP43-C_d

Avoid undefined behavior when using restrict-qualified pointers.

CERT-EXP44-C

Do not rely on side effects in operands to sizeof, _Alignof, or _Generic.

CERT-EXP45-C

Do not perform assignments in selection statements

CERT-EXP46-C

Do not use a bitwise operator with a Boolean-like operand.

CERT-EXP47-C_a

Do not call va_arg with an argument of the incorrect type

CERT-EXP47-C_b

Do not call va_arg with an argument of the incorrect type

CERT-FIO30-C

Exclude user input from format strings.

CERT-FIO32-C

Do not perform operations on devices that are only appropriate for files

CERT-FIO34-C

Distinguish between characters read from a file and EOF or WEOF.

CERT-FIO37-C

A string returned by fgets() and fgetsws() might contain NULL characters.

CERT-FIO38-C

A FILE object is copied.

CERT-FIO39-C

Do not alternately input and output from a stream without an intervening flush or positioning call.

CERT-FIO40-C

Reset strings on fgets() or fgetws() failure.

CERT-FIO41-C

Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects.

CERT-FIO42-C_a

Close files when they are no longer needed.

CERT-FIO42-C_b

Close files when they are no longer needed.

CERT-FIO44-C

Only use values for fsetpos() that are returned from fgetpos().

CERT-FIO45-C

Avoid TOCTOU race conditions while accessing files.

CERT-FIO46-C_a

Do not access a closed file.

CERT-FIO46-C_b

Do not access a closed file.

CERT-FIO46-C_c

Do not access a closed file.

CERT-FIO47-C_a

Use valid format strings.

CERT-FIO47-C_b

Use valid format strings.

CERT-FIO47-C_c

Use valid format strings.

CERT-FLP30-C_a

Do not use floating-point variables as loop counters

CERT-FLP30-C_b

Do not use floating-point variables as loop counters

CERT-FLP32-C_a

Prevent or detect domain and range errors in math functions.

CERT-FLP32-C_b

Prevent or detect domain and range errors in math functions.

CERT-FLP34-C

Ensure that floating-point conversions are within range of the new type

CERT-FLP36-C

Preserve precision when converting integral values to floating-point type.

CERT-FLP37-C

Do not use object representations to compare floating-point values.

CERT-INT30-C_a

Ensure that unsigned integer operations do not wrap.

CERT-INT30-C_b

Ensure that unsigned integer operations do not wrap.

CERT-INT31-C_a

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

CERT-INT31-C_b

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

CERT-INT31-C_c

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

CERT-INT32-C_a

Ensure that operations on signed integers do not result in overflow.

CERT-INT32-C_b

Ensure that operations on signed integers do not result in overflow.

CERT-INT33-C_a

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

CERT-INT33-C_b

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

CERT-INT33-C_c

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

CERT-INT33-C_d

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

CERT-INT33-C_e

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

CERT-INT33-C_f

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

CERT-INT33-C_g

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

CERT-INT33-C_h

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

CERT-INT33-C_i

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

CERT-INT34-C_a

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.

CERT-INT34-C_b

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.

CERT-INT34-C_c

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.

CERT-INT35-C

Use correct integer precisions.

CERT-INT36-C

Converting a pointer to integer or integer to pointer.

CERT-MEM30-C_a

Do not access freed memory.

CERT-MEM30-C_b

Do not access freed memory.

CERT-MEM30-C_c

Do not access freed memory.

CERT-MEM31-C

Free dynamically allocated memory when no longer needed.

CERT-MEM33-C_a

Allocate and copy structures containing a flexible array member dynamically.

CERT-MEM33-C_b

Allocate and copy structures containing a flexible array member dynamically.

CERT-MEM34-C_a

Only free memory allocated dynamically.

CERT-MEM34-C_b

Only free memory allocated dynamically.

CERT-MEM34-C_c

Only free memory allocated dynamically.

CERT-MEM35-C_a

Allocate sufficient memory for an object.

CERT-MEM35-C_b

Allocate sufficient memory for an object.

CERT-MEM35-C_c

Allocate sufficient memory for an object.

CERT-MEM36-C

Do not modify the alignment of objects by calling realloc().

CERT-MSC30-C

Do not use the rand() function for generating pseudorandom numbers

CERT-MSC32-C

Properly seed pseudorandom number generators

CERT-MSC33-C

Do not pass invalid data to the asctime() function.

CERT-MSC37-C

Ensure that control never reaches the end of a non-void function

CERT-MSC38-C

Do not treat a predefined identifier as an object if it might only be implemented as a macro

CERT-MSC39-C

Do not call va_arg() on a va_list that has an indeterminate value

CERT-MSC40-C_a

Do not violate constraints.

CERT-MSC40-C_b

Do not violate constraints.

CERT-MSC40-C_c

Do not violate constraints.

CERT-MSC40-C_d

Do not violate constraints.

CERT-MSC41-C_a

Never hard code sensitive information.

CERT-MSC41-C_b

Never hard code sensitive information.

CERT-MSC41-C_c

Never hard code sensitive information.

CERT-PRE31-C

Avoid side effects in arguments to unsafe macros.

CERT-PRE32-C_a

Do not use preprocessor directives in invocations of function-like macros.

CERT-PRE32-C_b

Do not use preprocessor directives in invocations of function-like macros.

CERT-SIG30-C

Call only asynchronous-safe functions within signal handlers

CERT-SIG31-C

Shared objects in a signal handler are accessed or modified.

CERT-SIG34-C

Do not call signal() from within interruptible signal handlers.

CERT-SIG35-C

Do not return from a computational exception signal handler.

CERT-STR30-C

Do not attempt to modify string literals.

CERT-STR31-C_a

Guarantee that storage for strings has sufficient space for character data and the null terminator.

CERT-STR31-C_b

Guarantee that storage for strings has sufficient space for character data and the null terminator.

CERT-STR31-C_c

Guarantee that storage for strings has sufficient space for character data and the null terminator.

CERT-STR31-C_d

Guarantee that storage for strings has sufficient space for character data and the null terminator.

CERT-STR31-C_e

Guarantee that storage for strings has sufficient space for character data and the null terminator.

CERT-STR31-C_f

Guarantee that storage for strings has sufficient space for character data and the null terminator.

CERT-STR31-C_g

Guarantee that storage for strings has sufficient space for character data and the null terminator.

CERT-STR31-C_h

Guarantee that storage for strings has sufficient space for character data and the null terminator.

CERT-STR32-C

Do not pass a non-null-terminated character sequence to a library function that expects a string.

CERT-STR34-C

Cast characters to unsigned char before converting to larger integer sizes.

CERT-STR37-C

Arguments to character-handling functions must be representable as an unsigned char.

CERT-STR38-C

Do not confuse narrow and wide character strings and functions.

SEC-BUFFER-memory-leak-alias

A memory leak is caused by incorrect deallocation.

SEC-BUFFER-memory-leak

A memory leak is caused by incorrect deallocation.

SEC-BUFFER-memset-overrun-pos

A call to memset might overrun the buffer.

SEC-BUFFER-memset-overrun

A call to memset overruns the buffer.

SEC-BUFFER-qsort-overrun-pos

Arguments passed to qsort might cause it to overrun.

SEC-BUFFER-qsort-overrun

Arguments passed to qsort cause it to overrun.

SEC-BUFFER-sprintf-overrun

A call to the sprintf function will overrun the target buffer.

SEC-BUFFER-std-sort-overrun-pos

Use of std::sort might cause a buffer overrun.

SEC-BUFFER-std-sort-overrun

A buffer overrun is caused by use of std::sort.

SEC-BUFFER-strcat-overrun-pos

A call to the strcat function might overrun the target buffer.

SEC-BUFFER-strcat-overrun

A call to the strcat function will overrun the target buffer.

SEC-BUFFER-strcpy-overrun-pos

A call to the strcpy function might overrun the target buffer.

SEC-BUFFER-strcpy-overrun

A call to the strcpy function will overrun the target buffer.

SEC-BUFFER-strncat-overrun-pos

A buffer overrun might be caused by a call to strncat.

SEC-BUFFER-strncat-overrun

A call to strncat causes a buffer overrun.

SEC-BUFFER-strncmp-overrun-pos

A call to strncmp might cause a buffer overrun.

SEC-BUFFER-strncmp-overrun

A buffer overrun is caused by a call to strncmp.

SEC-BUFFER-strncpy-overrun-pos

The target buffer might be overrun by a call to the strncpy function.

SEC-BUFFER-strncpy-overrun

A call to the strncpy function will overrun the target buffer.

SEC-BUFFER-tainted-alloc-size

A user is able to control the amount of memory used in an allocation.

SEC-BUFFER-tainted-copy-length

A tainted value is used as the size of the memory copied from one buffer to another.

SEC-BUFFER-tainted-copy

User input is copied into a buffer.

SEC-BUFFER-tainted-index

An array is accessed with an index derived from user input.

SEC-BUFFER-tainted-offset

A user-controlled variable is used as an offset to a pointer without proper bounds checking.

SEC-BUFFER-use-after-free-all

A pointer is used after it has been freed, on all execution paths.

SEC-BUFFER-use-after-free-some

A pointer is used after it has been freed, on some execution paths.

SEC-DIV-0-compare-after

After a successful comparison with 0, a variable is used as a divisor.

SEC-DIV-0-compare-before

A variable is first used as a divisor, then compared with 0.

SEC-DIV-0-tainted

User input is used as a divisor without validation.

SEC-FILEOP-open-no-close

All file pointers obtained dynamically by means of Standard Library functions must be explicitly released.

SEC-FILEOP-path-traversal

User input is used as a file path, or used to derive a file path.

SEC-FILEOP-use-after-close

A file resource is used after it has been closed.

SEC-INJECTION-sql

User input is improperly used in an SQL statement.

SEC-INJECTION-xpath

User input is improperly used as an XPath expression.

SEC-LOOP-tainted-bound

A user-controlled value is used as part of a loop condidition.

SEC-NULL-assignment-fun-pos

A pointer that might have been assigned the value NULL is dereferenced.

SEC-NULL-assignment

A pointer is assigned the value NULL, then dereferenced.

SEC-NULL-cmp-aft

A pointer is dereferenced, then compared with NULL.

SEC-NULL-cmp-bef-fun

A pointer is compared with NULL, then dereferenced by a function.

SEC-NULL-cmp-bef

A pointer is compared with NULL, then dereferenced.

SEC-NULL-literal-pos

A literal pointer expression (e.g. NULL) is dereferenced by a function call.

SEC-STRING-format-string

User input is used as a format string.

SEC-STRING-hard-coded-credentials

The application hard codes a username or password to connect to an external component.

MISRAC2004-1.1

(Required) All code shall conform to ISO 9899 standard, with no extensions permitted.

MISRAC2004-1.2_a

(Required) No reliance shall be placed on undefined or unspecified behavior. This is a semi-equivalent initialization check for arrays, which ensures that at least one element of the array has been written before any element is attempted to be read. A warning generally means that you have read an uninitialized value, which might cause the application to behave erroneously or crash.

MISRAC2004-1.2_b

(Required) No reliance shall be placed on undefined or unspecified behavior. Using uninitialized values might cause unexpected results or unpredictable behavior, particularly in the case of pointer fields.

MISRAC2004-1.2_c

(Required) No reliance shall be placed on undefined or unspecified behavior.

MISRAC2004-1.2_d

(Required) No reliance shall be placed on undefined or unspecified behavior.

MISRAC2004-1.2_e

(Required) No reliance shall be placed on undefined or unspecified behavior.

MISRAC2004-1.2_f

(Required) No reliance shall be placed on undefined or unspecified behavior.

MISRAC2004-1.2_g

(Required) No reliance shall be placed on undefined or unspecified behavior.

MISRAC2004-1.2_h

(Required) No reliance shall be placed on undefined or unspecified behavior.

MISRAC2004-1.2_i

(Required) No reliance shall be placed on undefined or unspecified behavior.

MISRAC2004-1.2_j

(Required) No reliance shall be placed on undefined or unspecified behavior.

MISRAC2004-2.1

(Required) Assembler language shall be encapsulated and isolated.

MISRAC2004-2.2

(Required) Source code shall only use /* ... */ style comments.

MISRAC2004-2.3

(Required) The character sequence /* shall not be used within a comment.

MISRAC2004-2.4

(Advisory) Sections of code should not be commented out.

MISRAC2004-4.1

(Required) Only those escape sequences that are defined in the ISO C standard shall be used.

MISRAC2004-5.1

(Required) Identifiers (internal and external) shall not rely on the significance of more than 31 characters.

MISRAC2004-5.2

(Required) Identifiers in an inner scope shall not use the same name as an identifier in an outer scope, and thus hide that identifier.

MISRAC2004-5.3

(Required) A typedef name shall be a unique identifier. This is a link analysis check.

MISRAC2004-5.4

(Required) A tag name shall be a unique identifier. This is a link analysis check.

MISRAC2004-5.5

(Advisory) No object or function identifier with static storage duration should be reused.

MISRAC2004-5.6

(Advisory) No identifier in one namespace should have the same spelling as an identifier in another namespace, with the exception of structure member and union member names.

MISRAC2004-5.7

(Advisory) No identifier name should be reused. This is a link analysis check.

MISRAC2004-6.1

(Required) The plain char type shall be used only for the storage and use of character values.

MISRAC2004-6.2

(Required) signed and unsigned char type shall be used only for the storage and use of numeric values.

MISRAC2004-6.3

(Advisory) typedefs that indicate size and signedness should be used in place of the basic types.

MISRAC2004-6.4

(Required) Bitfields shall only be defined to be of type unsigned int or signed int.

MISRAC2004-6.5

(Required) Bitfields of signed type shall be at least 2 bits long.

MISRAC2004-7.1

(Required) Octal constants shall not be used. Zero is okay

MISRAC2004-8.1

(Required) Functions shall have prototype declarations and the prototype shall be visible at both the function definition and call.

MISRAC2004-8.2

(Required) Whenever an object or function is declared or defined, its type shall be explicitly stated.

MISRAC2004-8.3

(Required) For each function parameter the type given in the declaration and definition shall be identical, and the return types shall also be identical. This is a link analysis check.

MISRAC2004-8.5_a

(Required) There shall be no definitions of objects or functions in a header file.

MISRAC2004-8.5_b

(Required) There shall be no definitions of objects or functions in a header file.

MISRAC2004-8.6

(Required) Functions shall be declared at file scope.

MISRAC2004-8.7

(Required) Objects shall be defined at block scope if they are only accessed from within a single function. This is a link analysis check.

MISRAC2004-8.8_a

(Required) An external object or function shall be declared once in one and only one file.

MISRAC2004-8.8_b

(Required) An external object or function shall be declared once in one and only one file. This is a link analysis check.

MISRAC2004-8.9

(Required) An identifier with external linkage shall have exactly one external definition. This is a link analysis check.

MISRAC2004-8.10

(Required) All declarations and definitions of objects or functions at file scope shall have internal linkage unless external linkage is required. This is a link analysis check.

MISRAC2004-8.12

(Required) When an array is declared with external linkage, its size shall be stated explicitly or defined implicitly by initialization.

MISRAC2004-9.1_a

(Required) All automatic variables shall have been assigned a value before being used.

MISRAC2004-9.1_b

(Required) All automatic variables shall have been assigned a value before being used.

MISRAC2004-9.1_c

(Required) All automatic variables shall have been assigned a value before being used.

MISRAC2004-9.2

(Required) Braces shall be used to indicate and match the structure in the non-zero initialization of arrays and structures.

MISRAC2004-9.3

(Required) In an enumerator list, the `=' construct shall not be used to explicitily initialise members other than the first, unless all items are explicitily initialized.

MISRAC2004-10.1_a

(Required) The value of an expression of integer type shall not be implicitly converted to a different underlying type if: (a) it is not a conversion to a wider integer type of the same signedness.

MISRAC2004-10.1_b

(Required) The value of an expression of integer type shall not be implicitly converted to a different underlying type if: (b) the expression is complex.

MISRAC2004-10.1_c

(Required) The value of an expression of integer type shall not be implicitly converted to a different underlying type if: (c) the expression is not constant and is a function argument.

MISRAC2004-10.1_d

(Required) The value of an expression of integer type shall not be implicitly converted to a different underlying type if: (d) the expression is not constant and is a return expression.

MISRAC2004-10.2_a

(Required) The value of an expression of floating type shall not be implicitly converted to a different underlying type if: (a) it is not a conversion to a wider floating type.

MISRAC2004-10.2_b

(Required) The value of an expression of floating type shall not be implicitly converted to a different underlying type if: (b) the expression is complex.

MISRAC2004-10.2_c

(Required) The value of an expression of floating type shall not be implicitly converted to a different underlying type if: (c) the expression is not constant and is a function argument.

MISRAC2004-10.2_d

(Required) The value of an expression of floating type shall not be implicitly converted to a different underlying type if: (d) the expression is not constant and is a return expression.

MISRAC2004-10.3

(Required) The value of a complex expression of integer type shall only be cast to a type that is not wider and of the same signedness as the underlying type of the expression.

MISRAC2004-10.4

(Required) The value of a complex expression of floating type shall only be cast to a floating type which is narrower or of the same size.

MISRAC2004-10.5

(Required) If the bitwise operators ~ and << are applied to an operand of underlying type unsigned char or unsigned short, the result shall be immediately cast to the underlying type of the operand.

MISRAC2004-10.6

(Required) A U suffix shall be applied to all constants of unsigned type.

MISRAC2004-11.1

(Required) Conversions shall not be performed between a pointer to a function and any type other than an integral type.

MISRAC2004-11.3

(Advisory) A cast should not be performed between a pointer type and an integral type.

MISRAC2004-11.4

(Advisory) A cast should not be performed between a pointer to object type and a different pointer to object type.

MISRAC2004-11.5

(Required) A cast shall not be performed that removes any const or volatile qualification from the type addressed by a pointer.

MISRAC2004-12.1

(Advisory) Limited dependence should be placed on the C operator precedence rules in expressions.

MISRAC2004-12.2_a

(Required) The value of an expression shall be the same under any order of evaluation that the standard permits.

MISRAC2004-12.2_b

(Required) The value of an expression shall be the same under any order of evaluation that the standard permits.

MISRAC2004-12.2_c

(Required) The value of an expression shall be the same under any order of evaluation that the standard permits.

MISRAC2004-12.3

(Required) The sizeof operator shall not be used on expressions that contain side effects. The sizeof operator was found used on expressions that contain side effects. This might make it look as if the expression will be evaluated, but because sizeof only operates on the type of the expression, the expression itself is not evaluated.

MISRAC2004-12.4

(Required) The right-hand operand of a logical && or || operator shall not contain side effects.

MISRAC2004-12.5

(Required) The operands of a logical && or || shall be primary-expressions.

MISRAC2004-12.6_a

(Advisory) The operands of logical operators (&&, ||, and !) should be effectively boolean.

MISRAC2004-12.6_b

(Advisory) Expressions that are effectively boolean should not be used as operands to operators other than (&&, ||, !, =, ==, !=, and ?:).

MISRAC2004-12.7

(Required) Bitwise operators shall not be applied to operands whose underlying type is signed.

MISRAC2004-12.8

(Required) The right-hand operand of a shift operator shall lie between zero and one less than the width in bits of the underlying type of the left-hand operand.

MISRAC2004-12.9

(Required) The unary minus operator shall not be applied to an expression whose underlying type is unsigned.

MISRAC2004-12.10

(Required) The comma operator shall not be used.

MISRAC2004-12.11

(Advisory) Evaluation of constant unsigned integer expressions should not lead to wrap-around.

MISRAC2004-12.12_a

(Required) The underlying bit representations of floating-point values shall not be used. To reinterpret bit patterns deliberately, use an explicit cast.

MISRAC2004-12.12_b

(Required) The underlying bit representations of floating-point values shall not be used.

MISRAC2004-12.13

(Advisory) The increment (++) and decrement (--) operators should not be mixed with other operators in an expression.

MISRAC2004-13.1

(Required) Assignment operators shall not be used in expressions that yield a boolean value.

MISRAC2004-13.2_a

(Advisory) Tests of a value against zero should be made explicit, unless the operand is effectively boolean.

MISRAC2004-13.2_b

(Advisory) Tests of a value against zero should be made explicit, unless the operand is effectively boolean.

MISRAC2004-13.2_c

(Advisory) Tests of a value against zero should be made explicit, unless the operand is effectively boolean.

MISRAC2004-13.2_d

(Advisory) Tests of a value against zero should be made explicit, unless the operand is effectively boolean.

MISRAC2004-13.2_e

(Advisory) Tests of a value against zero should be made explicit, unless the operand is effectively boolean.

MISRAC2004-13.3

(Required) Floating-point expressions shall not be tested for equality or inequality.

MISRAC2004-13.4

(Required) The controlling expression of a for statement shall not contain any objects of floating type.

MISRAC2004-13.5

(Required) The three expressions of a for statement shall be concerned only with loop control.

MISRAC2004-13.6

(Required) Numeric variables being used within a for loop for iteration counting shall not be modified in the body of the loop.

MISRAC2004-13.7_a

(Required) Boolean operations whose results are invariant shall not be permitted.

MISRAC2004-13.7_b

(Required) Boolean operations whose results are invariant shall not be permitted.

MISRAC2004-14.1

(Required) There shall be no unreachable code.

MISRAC2004-14.2

(Required) All non-null statements shall either have at least one side effect however executed, or cause control flow to change.

MISRAC2004-14.3

(Required) Before preprocessing, a null statement shall only occur on a line by itself; it may be followed by a comment, provided that the first character following the null statement is a whitespace character.

MISRAC2004-14.4

(Required) The goto statement shall not be used.

MISRAC2004-14.5

(Required) The continue statement shall not be used.

MISRAC2004-14.6

(Required) For any iteration statement, there shall be at most one break statement used for loop termination.

MISRAC2004-14.7

(Required) A function shall have a single point of exit at the end of the function.

MISRAC2004-14.8_a

(Required) The statement forming the body of a switch, while, do ... while, or for statement shall be a compound statement.

MISRAC2004-14.8_b

(Required) The statement forming the body of a switch, while, do ... while, or for statement shall be a compound statement.

MISRAC2004-14.8_c

(Required) The statement forming the body of a switch, while, do ... while, or for statement shall be a compound statement.

MISRAC2004-14.8_d

(Required) The statement forming the body of a switch, while, do ... while, or for statement shall be a compound statement.

MISRAC2004-14.9

(Required) An if expression construct shall be followed by a compound statement. The else keyword shall be followed by either a compound statement or another if statement.

MISRAC2004-14.10

(Required) All if ... else if constructs shall be terminated with an else clause.

MISRAC2004-15.0

(Required) The MISRA C switch syntax shall be used.

MISRAC2004-15.1

(Required) A switch label shall only be used when the most closely-enclosing compound statement is the body of a switch statement.

MISRAC2004-15.2

(Required) An unconditional break statement shall terminate every non-empty switch clause.

MISRAC2004-15.3

(Required) The final clause of a switch statement shall be the default clause.

MISRAC2004-15.4

(Required) A switch expression shall not represent a value that is effectively boolean.

MISRAC2004-15.5

(Required) Every switch statement shall have at least one case clause.

MISRAC2004-16.1

(Required) Functions shall not be defined with a variable number of arguments.

MISRAC2004-16.2_a

(Required) Functions shall not call themselves, either directly or indirectly.

MISRAC2004-16.2_b

(Required) Functions shall not call themselves, either directly or indirectly. This is a link analysis check.

MISRAC2004-16.3

(Required) Identifiers shall be given for all of the parameters in a function prototype declaration.

MISRAC2004-16.4

(Required) The identifiers used in the declaration and definition of a function shall be identical. This is a link analysis check.

MISRAC2004-16.5

(Required) Functions with no parameters shall be declared and defined with the parameter list void.

MISRAC2004-16.7

(Required) A pointer parameter in a function prototype should be declared as pointer to const if the pointer is not used to modify the addressed object.

MISRAC2004-16.8

(Required) All exit paths from a function with non-void return type shall have an explicit return statement with an expression.

MISRAC2004-16.9

(Required) A function identifier shall only be used with either a preceding &, or with a parenthesized parameter list, which may be empty.

MISRAC2004-16.10

(Required) If a function returns error information, then that error information shall be tested.

MISRAC2004-17.1_a

(Required) Pointer arithmetic shall only be applied to pointers that address an array or array element.

MISRAC2004-17.1_b

(Required) Pointer arithmetic shall only be applied to pointers that address an array or array element.

MISRAC2004-17.1_c

(Required) Pointer arithmetic shall only be applied to pointers that address an array or array element.

MISRAC2004-17.2

(Required) Pointer subtraction shall only be applied to pointers that address elements of the same array. Note: This rule will only accept arrays of the form '<type> <name>[<size>]'.

MISRAC2004-17.3

(Required) >, >=, < and <= shall not be applied to pointer types except where they point to the same array.

MISRAC2004-17.4_a

(Required) Array indexing shall be the only allowed form of pointer arithmetic.

MISRAC2004-17.4_b

(Required) Array indexing shall be the only allowed form of pointer arithmetic.

MISRAC2004-17.5

(Required) The declaration of objects should contain no more than two levels of pointer indirection.

MISRAC2004-17.6_a

(Required) The address of an object with automatic storage shall not be assigned to another object that may persist after the first object has ceased to exist.

MISRAC2004-17.6_b

(Required) The address of an object with automatic storage shall not be assigned to another object that may persist after the first object has ceased to exist.

MISRAC2004-17.6_c

(Required) The address of an object with automatic storage shall not be assigned to another object that may persist after the first object has ceased to exist.

MISRAC2004-17.6_d

(Required) The address of an object with automatic storage shall not be assigned to another object that may persist after the first object has ceased to exist.

MISRAC2004-18.1

(Required) All structure and union types shall be complete at the end of the translation unit.

MISRAC2004-18.2

(Required) An object shall not be assigned to an overlapping object.

MISRAC2004-18.4

(Required) Unions shall not be used.

MISRAC2004-19.1

(Advisory) #include statements in a file should only be preceded by other preprocessor directives or comments.

MISRAC2004-19.2

(Advisory) Non-standard characters should not occur in header file names in #include directives.

MISRAC2004-19.4

(Required) C macros shall only expand to a braced initialiser, a constant, a string literal, a parenthesised expression, a type qualifier, a storage class specifier, or a do-while-zero construct.

MISRAC2004-19.5

(Required) Macros shall not be #define'd or #undef'd within a block.

MISRAC2004-19.6

(Required) #undef shall not be used.

MISRAC2004-19.7

(Advisory) A function should be used in preference to a function-like macro.

MISRAC2004-19.10

(Required) In the definition of a function-like macro each instance of a parameter shall be enclosed in parentheses unless it is used as the operand of # or ##.

MISRAC2004-19.12

(Required) There shall be at most one occurrence of the # or ## preprocessor operators in a single macro definition.

MISRAC2004-19.13

(Advisory) The # and ## preprocessor operators should not be used.

MISRAC2004-19.15

(Required) Precautions shall be taken in order to prevent the contents of a header file being included twice.

MISRAC2004-20.1

(Required) Reserved identifiers, macros, and functions in the standard library shall not be defined, redefined, or undefined.

MISRAC2004-20.2

(Required) The names of standard library macros, objects and functions shall not be reused.

MISRAC2004-20.3_a

(Required) The validity of values passed to library functions shall be checked (>0 case).

MISRAC2004-20.3_b

(Required) The validity of values passed to library functions shall be checked (>=0 case).

MISRAC2004-20.3_c

(Required) The validity of values passed to library functions shall be checked (!=0 case).

MISRAC2004-20.3_d

(Required) The validity of values passed to library functions shall be checked (<=1 case).

MISRAC2004-20.3_e

(Required) The validity of values passed to library functions shall be checked (<1 case).

MISRAC2004-20.3_f

(Required) The validity of values passed to library functions shall be checked (>=-1 case).

MISRAC2004-20.3_g

(Required) The validity of values passed to library functions shall be checked (>-1 case).

MISRAC2004-20.3_h

(Required) The validity of values passed to library functions shall be checked (<=255 case).

MISRAC2004-20.3_i

(Required) The validity of values passed to library functions shall be checked (min value case).

MISRAC2004-20.4

(Required) Dynamic heap memory allocation shall not be used.

MISRAC2004-20.5

(Required) The error indicator errno shall not be used.

MISRAC2004-20.6

(Required) The macro offsetof in the stddef.h library shall not be used.

MISRAC2004-20.7

(Required) The setjmp macro and the longjmp function shall not be used.

MISRAC2004-20.8

(Required) The signal handling facilities of signal.h shall not be used.

MISRAC2004-20.9

(Required) The input/output library stdio.h shall not be used in production code.

MISRAC2004-20.10

(Required) The functions atof, atoi, and atol from the library stdlib.h shall not be used.

MISRAC2004-20.11

(Required) The functions abort, exit, getenv, and system from the library stdlib.h shall not be used.

MISRAC2004-20.12

(Required) The time handling functions of time.h shall not be used.

MISRAC2012-Dir-4.3

(Required) Assembly language shall be encapsulated and isolated

MISRAC2012-Dir-4.4

(Advisory) Sections of code should not be "commented out" Code sections in comments were found where the comment ends with a ';', '{', or '}' character.

MISRAC2012-Dir-4.5

(Advisory) Identifiers in the same namespace, with overlapping visibility, should be typographically unambiguous.

MISRAC2012-Dir-4.6_a

(Advisory) typedefs that indicate size and signedness should be used in place of the basic numerical types The basic types char, int, short, long, double, and float are used without a typedef. Best practice is to use typedefs for portability.

MISRAC2012-Dir-4.6_b

(Advisory) typedefs that indicate size and signedness should be used in place of the basic numerical types

MISRAC2012-Dir-4.7_a

(Required) If a function returns error information, then that error information shall be tested.

MISRAC2012-Dir-4.7_b

(Required) If a function returns error information, then that error information shall be tested.

MISRAC2012-Dir-4.7_c

(Required) If a function returns error information, then that error information shall be tested.

MISRAC2012-Dir-4.8

(Advisory) If a pointer to a structure or union is never dereferenced within a translation unit, then the implementation of the object should be hidden.

MISRAC2012-Dir-4.9

(Advisory) A function should be used in preference to a function-like macro where they are interchangeable

MISRAC2012-Dir-4.10

(Required) Precautions shall be taken in order to prevent the contents of a header file being included more than once

MISRAC2012-Dir-4.11_a

(Required) The validity of values passed to library functions shall be checked (>0 case).

MISRAC2012-Dir-4.11_b

(Required) The validity of values passed to library functions shall be checked (>=0 case).

MISRAC2012-Dir-4.11_c

(Required) The validity of values passed to library functions shall be checked (!=0 case).

MISRAC2012-Dir-4.11_d

(Required) The validity of values passed to library functions shall be checked (<=1 case).

MISRAC2012-Dir-4.11_e

(Required) The validity of values passed to library functions shall be checked (<1 case).

MISRAC2012-Dir-4.11_f

(Required) The validity of values passed to library functions shall be checked (>=-1 case).

MISRAC2012-Dir-4.11_g

(Required) The validity of values passed to library functions shall be checked (>-1 case).

MISRAC2012-Dir-4.11_h

(Required) The validity of values passed to library functions shall be checked (<=255 case).

MISRAC2012-Dir-4.11_i

(Required) The validity of values passed to library functions shall be checked (min value case).

MISRAC2012-Dir-4.12

(Required) Dynamic memory allocation shall not be used.

MISRAC2012-Dir-4.13_a

(Advisory) Functions which are designed to provide operations on a resource should be called in an approriate sequence. A mutex is locked and then never released. This might cause a deadlock.

MISRAC2012-Dir-4.13_b

(Advisory) Functions which are designed to provide operations on a resource should be called in an approriate sequence. Memory is allocated, but then the pointer value is lost due to reassignment or its scope ending, without a guarantee of the value being propagated or the memory being freed. There must be no possible execution path during which the value is not freed, returned, or passed into another function as an argument, before it is lost. This is a memory leak.

MISRAC2012-Dir-4.13_c

(Advisory) Functions which are designed to provide operations on a resource should be called in an approriate sequence. One or more file pointers are never closed. To avoid failure caused by resource exhaustion, all file pointers obtained dynamically by means of Standard Library functions must be explicitly released. Releasing them as soon as possible reduces the risk that exhaustion will occur.

MISRAC2012-Dir-4.13_d

(Advisory) Functions which are designed to provide operations on a resource should be called in an appropriate sequence. Memory is being accessed after it has been deallocated. The application might appear to run normally, but the operation is illegal. The most likely result is a crash, but the application might keep running with erroneous or corrupt data.

MISRAC2012-Dir-4.13_e

(Advisory) Functions which are designed to provide operations on a resource should be called in an appropriate sequence. A pointer is used after it has been freed. This might cause data corruption or an application crash.

MISRAC2012-Dir-4.13_f

(Advisory) Functions which are designed to provide operations on a resource should be called in an appropriate sequence. A file resource is referred to after it has been closed. When a file has been closed, any reference to it is invalid. Using this reference might cause an application crash.

MISRAC2012-Dir-4.13_g

(Advisory) Functions which are designed to provide operations on a resource should be called in an appropriate sequence. A pointer is freed without having been allocated.

MISRAC2012-Dir-4.13_h

(Advisory) Functions which are designed to provide operations on a resource should be called in an appropriate sequence. A struct field is deallocated without first having been allocated. This might cause a runtime error.

MISRAC2012-Dir-4.14_a

(Required) The validity of values received from external sources shall be checked.

MISRAC2012-Dir-4.14_b

(Required) The validity of values received from external sources shall be checked.

MISRAC2012-Dir-4.14_c

(Required) The validity of values received from external sources shall be checked.

MISRAC2012-Dir-4.14_d

(Required) The validity of values received from external sources shall be checked.

MISRAC2012-Dir-4.14_e

(Required) The validity of values received from external sources shall be checked.

MISRAC2012-Dir-4.14_f

(Required) The validity of values received from external sources shall be checked.

MISRAC2012-Dir-4.14_g

(Required) The validity of values received from external sources shall be checked.

MISRAC2012-Dir-4.14_h

(Required) The validity of values received from external sources shall be checked.

MISRAC2012-Dir-4.14_i

(Required) The validity of values received from external sources shall be checked.

MISRAC2012-Dir-4.14_j

(Required) The validity of values received from external sources shall be checked.

MISRAC2012-Dir-4.14_l

(Required) The validity of values received from external sources shall be checked.

MISRAC2012-Dir-4.14_m

(Required) The validity of values received from external sources shall be checked.

MISRAC2012-Dir-4.15

(Required) Evaluation of floating-point expressions shall not lead to the undetected generation of infinities and NaNs.

MISRAC2012-Rule-1.3_a

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_b

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_c

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_d

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_e

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_f

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_g

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_h

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_i

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_j

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_k

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_l

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_m

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_n

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_o

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_p

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_q

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_r

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_s

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_t

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_u

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.3_v

(Required) There shall be no occurrence of undefined or critical unspecified behavior.

MISRAC2012-Rule-1.4

(Required) Emergent language features shall not be used.

MISRAC2012-Rule-1.5_b

(Required) Obsolescent language features shall not be used.

MISRAC2012-Rule-1.5_c

(Required) Obsolescent language features shall not be used.

MISRAC2012-Rule-1.5_d

(Required) Obsolescent language features shall not be used.

MISRAC2012-Rule-1.5_e

(Required) Obsolescent language features shall not be used.

MISRAC2012-Rule-1.5_f

(Required) Obsolescent language features shall not be used.

MISRAC2012-Rule-1.5_g

(Required) Obsolescent language features shall not be used. Invoking realloc with a size argument equal to zero is an obsolescent feature.

MISRAC2012-Rule-2.1_a

(Required) A project shall not contain unreachable code.

MISRAC2012-Rule-2.1_b

(Required) A project shall not contain unreachable code.

MISRAC2012-Rule-2.2_a

(Required) There shall be no dead code.

MISRAC2012-Rule-2.2_b

(Required) There shall be no dead code.

MISRAC2012-Rule-2.2_c

(Required) There shall be no dead code.

MISRAC2012-Rule-2.3

(Advisory) A project should not contain unused type declarations. This is a link analysis check.

MISRAC2012-Rule-2.4

(Advisory) A project should not contain unused tag declarations. This is a link analysis check.

MISRAC2012-Rule-2.5

(Advisory) A project should not contain unused macro declarations. This is a link analysis check.

MISRAC2012-Rule-2.6

(Advisory) A function should not contain unused label declarations.

MISRAC2012-Rule-2.7

(Advisory) There should be no unused parameters in functions.

MISRAC2012-Rule-2.8_a

(Advisory) A project should not contain unused Object definitions. This is a link analysis check.

MISRAC2012-Rule-2.8_b

(Advisory) A project should not contain unused Object definitions. This is a link analysis check.

MISRAC2012-Rule-2.8_c

(Advisory) A project should not contain unused Object definitions.

MISRAC2012-Rule-3.1

(Required) The character sequences /* and // shall not be used within a comment.

MISRAC2012-Rule-3.2

(Required) Line-splicing shall not be used in // comments.

MISRAC2012-Rule-4.1

(Required) Octal or hexadecimal escape sequences shall be terminated.

MISRAC2012-Rule-5.1

(Required) External identifiers shall be distinct. This is a link analysis check.

MISRAC2012-Rule-5.2_c89

(Required) Identifiers declared in the same scope and name space shall be distinct.

MISRAC2012-Rule-5.2_c99

(Required) Identifiers declared in the same scope and name space shall be distinct.

MISRAC2012-Rule-5.3_c89

(Required) An identifier declared in an inner scope shall not hide an identifier declared in an outer scope.

MISRAC2012-Rule-5.3_c99

(Required) An identifier declared in an inner scope shall not hide an identifier declared in an outer scope.

MISRAC2012-Rule-5.4_c89

(Required) Macro identifiers shall be distinct.

MISRAC2012-Rule-5.4_c99

(Required) Macro identifiers shall be distinct.

MISRAC2012-Rule-5.5_c89

(Required) Identifiers shall be distinct from macro names.

MISRAC2012-Rule-5.5_c99

(Required) Identifiers shall be distinct from macro names.

MISRAC2012-Rule-5.6

(Required) A typedef name shall be a unique identifier. This is a link analysis check.

MISRAC2012-Rule-5.7

(Required) A tag name shall be a unique identifier. This is a link analysis check.

MISRAC2012-Rule-5.8

(Required) Identifiers that define objects or functions with external linkage shall be unique. This is a link analysis check.

MISRAC2012-Rule-5.9

(Advisory) Identifiers that define objects or functions with internal linkage should be unique. This is a link analysis check.

MISRAC2012-Rule-6.1

(Required) Bitfields shall only be declared with an appropriate type.

MISRAC2012-Rule-6.2

(Required) Single-bit named bitfields shall not be of a signed type.

MISRAC2012-Rule-6.3

(Required) A bit field shall not be declared as a member of a union.

MISRAC2012-Rule-7.1

(Required) Octal constants shall not be used.

MISRAC2012-Rule-7.2

(Required) A "u" or "U" suffix shall be applied to all integer constants that are represented in an unsigned type.

MISRAC2012-Rule-7.3

(Required) The lowercase character "l" shall not be used in a literal suffix.

MISRAC2012-Rule-7.4_a

(Required) A string literal shall not be assigned to an object unless the object's type is "pointer to const-qualified char".

MISRAC2012-Rule-7.4_b

(Required) A string literal shall not be assigned to an object unless the object's type is "pointer to const-qualified char".

MISRAC2012-Rule-7.5

(Mandatory) The argument of an integer constant macro shall have an appropriate form.

MISRAC2012-Rule-7.6

(Required) The small integer variants of the minimum-width integer constant macros shall not be used.

MISRAC2012-Rule-8.1

(Required) Types shall be explicitly specified.

MISRAC2012-Rule-8.2_a

(Required) Function types shall be in prototype form with named parameters.

MISRAC2012-Rule-8.2_b

(Required) Function types shall be in prototype form with named parameters.

MISRAC2012-Rule-8.3

(Required) All declarations of an object or function shall use the same names and type qualifiers. This is a link analysis check.

MISRAC2012-Rule-8.4

(Required) A compatible declaration shall be visible when an object or function with external linkage is defined.

MISRAC2012-Rule-8.5_a

(Required) An external object or function shall be declared once in one and only one file.

MISRAC2012-Rule-8.5_b

(Required) An external object or function shall be declared once in one and only one file. This is a link analysis check.

MISRAC2012-Rule-8.6

(Required) An identifier with external linkage shall have exactly one external definition. This is a link analysis check.

MISRAC2012-Rule-8.7

(Advisory) Functions and objects should not be defined with external linkage if they are referenced in only one translation unit. This is a link analysis check.

MISRAC2012-Rule-8.9_a

(Advisory) An object should be defined at block scope if its identifier only appears in a single function.

MISRAC2012-Rule-8.9_b

(Advisory) An object should be defined at block scope if its identifier only appears in a single function. This is a link analysis check.

MISRAC2012-Rule-8.10

(Required) An inline function shall be declared with the static storage class.

MISRAC2012-Rule-8.11

(Advisory) When an array with external linkage is declared, its size should be explicitly specified.

MISRAC2012-Rule-8.12

(Required) The value of an implicitly-specified enumeration constant shall be unique.

MISRAC2012-Rule-8.13

(Advisory) A pointer should be const-qualified whenever possible.

MISRAC2012-Rule-8.14

(Required) The restrict type qualifier shall not be used.

MISRAC2012-Rule-8.15

(Required) All declarations of an object with an explicit alignment specification shall specify the same alignment. This is a link analysis check.

MISRAC2012-Rule-8.16

(Advisory) The alignment specification of zero should not appear in an object declaration.

MISRAC2012-Rule-8.17

(Advisory) At most one explicit alignment specifier should appear in an object declaration.

MISRAC2012-Rule-9.1_a

(Mandatory) The value of an object with automatic storage duration shall not be read before it has been set.

MISRAC2012-Rule-9.1_b

(Mandatory) The value of an object with automatic storage duration shall not be read before it has been set.

MISRAC2012-Rule-9.1_d

(Mandatory) The value of an object with automatic storage duration shall not be read before it has been set.

MISRAC2012-Rule-9.1_e

(Mandatory) The value of an object with automatic storage duration shall not be read before it has been set.

MISRAC2012-Rule-9.2

(Required) The initializer for an aggregate or union shall be enclosed in braces.

MISRAC2012-Rule-9.3

(Required) Arrays shall not be partially initialized.

MISRAC2012-Rule-9.4

(Required) An element of an object shall not be initialized more than once.

MISRAC2012-Rule-9.5_a

(Required) Where designated initializers are used to initialize an array object the size of the array shall be specified explicitly.

MISRAC2012-Rule-9.5_b

(Required) Where designated initializers are used to initialize an array object the size of the array shall be specified explicitly.

MISRAC2012-Rule-9.6

(Required) An initializer using chained designators shall not contain initializers without designators.

MISRAC2012-Rule-9.7

(Mandatory) Atomic objects shall be appropriately initialized before being accessed.

MISRAC2012-Rule-10.1_R1

(Required) Operands shall not be of an inappropriate essential type.

MISRAC2012-Rule-10.1_R2

(Required) Operands shall not be of an inappropriate essential type.

MISRAC2012-Rule-10.1_R3

(Required) Operands shall not be of an inappropriate essential type.

MISRAC2012-Rule-10.1_R4

(Required) Operands shall not be of an inappropriate essential type.

MISRAC2012-Rule-10.1_R5

(Required) Operands shall not be of an inappropriate essential type.

MISRAC2012-Rule-10.1_R6

(Required) Operands shall not be of an inappropriate essential type.

MISRAC2012-Rule-10.1_R7

(Required) Operands shall not be of an inappropriate essential type. The right-hand operand of a shift operator is not of essentially unsigned type, meaning that undefined behavior might result from a negative shift.

MISRAC2012-Rule-10.1_R8

(Required) Operands shall not be of an inappropriate essential type. An operand of essentially unsigned typed is used as the operand to the unary minus operator. This is problematic because the signedness of the result is determined by the implementation-defined size of int.

MISRAC2012-Rule-10.1_R10

(Required) The inherent nature of floating-point types is such that comparisons of equality will often not evaluate to true even when they are expected to.

MISRAC2012-Rule-10.2

(Required) Expressions of essentially character type shall not be used inappropriately in addition and subtraction operations.

MISRAC2012-Rule-10.3

(Required) The value of an expression shall not be assigned to an object with a narrower essential type or of a different essential type category

MISRAC2012-Rule-10.4_a

(Required) Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category.

MISRAC2012-Rule-10.4_b

(Required) The second and third operands of the ternary operator shall have the same essential type category.

MISRAC2012-Rule-10.5

(Advisory) The value of an expression should not be cast to an inappropriate essential type.

MISRAC2012-Rule-10.6

(Required) The value of a composite expression shall not be assigned to an object with wider essential type

MISRAC2012-Rule-10.7

(Required) If a composite expression is used as one operand of an operator in which the usual arithmetic conversions are performed then the other operand shall not have wider essential type

MISRAC2012-Rule-10.8

(Required) The value of a composite expression shall not be cast to a different essential type category or a wider essential type

MISRAC2012-Rule-11.1

(Required) Conversions shall not be performed between a pointer to a function and any other type

MISRAC2012-Rule-11.2

(Required) Conversions shall not be performed between a pointer to an incomplete type and any other types.

MISRAC2012-Rule-11.3

(Required) A cast shall not be performed between a pointer to object type and a pointer to a different object type A pointer to object type is cast to a pointer to a different object type. Conversions of this type might be invalid if the new pointer type requires a stricter alignment.

MISRAC2012-Rule-11.4

(Advisory) A conversion should not be performed between a pointer to object and an integer type

MISRAC2012-Rule-11.5

(Advisory) A conversion should not be performed from pointer to void into pointer to object.

MISRAC2012-Rule-11.6

(Required) A cast shall not be performed between pointer to void and an arithmetic type.

MISRAC2012-Rule-11.7

(Required) A cast shall not be performed between pointer to object and a non-integer arithmetic type

MISRAC2012-Rule-11.8

(Required) A cast shall not remove any const or volatile qualification from the type pointed to by a pointer A cast that removes a const or volatile qualification was found. This violates the principle of type qualification. Changes to the qualification of the pointer during the cast were not checked for.

MISRAC2012-Rule-11.9

(Required) The macro NULL shall be the only permitted form of integer null pointer constant

MISRAC2012-Rule-11.10

(Required) The _Atomic qualifier shall not be applied to the incomplete type void

MISRAC2012-Rule-12.1

(Advisory) The precedence of operators within expressions should be made explicit

MISRAC2012-Rule-12.2

(Required) The right hand operand of a shift operator shall lie in the range zero to one less than the width in bits of the essential type of the left hand operand

MISRAC2012-Rule-12.3

(Advisory) The comma operator should not be used

MISRAC2012-Rule-12.4

(Advisory) Evaluation of constant expressions should not lead to unsigned integer wrap-around

MISRAC2012-Rule-12.5

(Mandatory) The sizeof operator shall not have an operand which is a function parameter declared as `array of type'.

MISRAC2012-Rule-12.6

(Required) Structure and union members of atomic objects shall not be directly accessed

MISRAC2012-Rule-13.1

(Required) Initializer lists shall not contain persistent side effects

MISRAC2012-Rule-13.2_a

(Required) The value of an expression and its persistent side effects shall be the same under all permitted evaluation orders

MISRAC2012-Rule-13.2_b

(Required) The value of an expression and its persistent side effects shall be the same under all permitted evaluation orders

MISRAC2012-Rule-13.2_c

(Required) The value of an expression and its persistent side effects shall be the same under all permitted evaluation orders

MISRAC2012-Rule-13.3

(Advisory) A full expression containing an increment (++) or decrement (--) operator should have no other potential side effects other than that caused by the increment or decrement operator

MISRAC2012-Rule-13.4_a

(Advisory) The result of an assignment operator should not be used

MISRAC2012-Rule-13.4_b

(Advisory) The result of an assignment operator should not be used

MISRAC2012-Rule-13.5

(Required) The right hand operand of a logical && or || operator shall not contain persistent side effects

MISRAC2012-Rule-13.6

(Required) The operand of the sizeof operator shall not contain any expression which has potential side effects

MISRAC2012-Rule-14.1_a

(Required) A loop counter shall not have essentially floating type.

MISRAC2012-Rule-14.1_b

(Required) A loop counter shall not have essentially floating type

MISRAC2012-Rule-14.2

(Required) A for loop shall be well-formed.

MISRAC2012-Rule-14.3_a

(Required) Controlling expressions shall not be invariant

MISRAC2012-Rule-14.3_b

(Required) Controlling expressions shall not be invariant

MISRAC2012-Rule-14.4_a

(Required) The controlling expression of an if statement and the controlling expression of an iteration-statement shall have essentially Boolean type

MISRAC2012-Rule-14.4_b

(Required) The controlling expression of an if statement and the controlling expression of an iteration-statement shall have essentially Boolean type

MISRAC2012-Rule-14.4_c

(Required) The controlling expression of an if statement and the controlling expression of an iteration-statement shall have essentially Boolean type

MISRAC2012-Rule-14.4_d

(Required) The controlling expression of an if statement and the controlling expression of an iteration-statement shall have essentially Boolean type

MISRAC2012-Rule-15.1

(Advisory) The goto statement should not be used

MISRAC2012-Rule-15.2

(Required) The goto statement shall jump to a label declared later in the same function

MISRAC2012-Rule-15.3

(Required) Any label referenced by a goto statement shall be declared in the same block, or in any block enclosing the goto statement

MISRAC2012-Rule-15.4

(Advisory) There should be no more than one break or goto statement used to terminate any iteration statement

MISRAC2012-Rule-15.5

(Advisory) A function should have a single point of exit at the end

MISRAC2012-Rule-15.6_a

(Required) The body of an iteration-statement or a selection-statement shall be acompound-statement

MISRAC2012-Rule-15.6_b

(Required) The body of an iteration-statement or a selection-statement shall be acompound-statement

MISRAC2012-Rule-15.6_c

(Required) The body of an iteration-statement or a selection-statement shall be acompound-statement

MISRAC2012-Rule-15.6_d

(Required) The body of an iteration-statement or a selection-statement shall be acompound-statement

MISRAC2012-Rule-15.6_e

(Required) The body of an iteration-statement or a selection-statement shall be acompound-statement

MISRAC2012-Rule-15.7

(Required) All if ... else if constructs shall be terminated with an else clause containing either a side effect or a comment

MISRAC2012-Rule-16.1

(Required) All switch statements shall be well-formed

MISRAC2012-Rule-16.2

(Required) A switch label shall only be used when the most closely-enclosing compound statement is the body of a switch statement

MISRAC2012-Rule-16.3

(Required) An unconditional break statement shall terminate every switch-clause

MISRAC2012-Rule-16.4

(Required) Every switch statement shall have a default label

MISRAC2012-Rule-16.5

(Required) A default label shall appear as either the first or the last switch label of a switch statement

MISRAC2012-Rule-16.6

(Required) Every switch statement shall have at least two switch-clauses

MISRAC2012-Rule-16.7

(Required) A switch-expression shall not have essentially Boolean type

MISRAC2012-Rule-17.1

(Required) The features of <stdarg.h> shall not be used

MISRAC2012-Rule-17.2_a

(Required) Functions shall not call themselves, either directly or indirectly

MISRAC2012-Rule-17.2_b

(Required) Functions shall not call themselves, either directly or indirectly This is a link analysis check.

MISRAC2012-Rule-17.3

(Mandatory) A function shall not be declared implicitly

MISRAC2012-Rule-17.4

(Mandatory) All exit paths from a function with non-void return type shall have an explicit return statement with an expression

MISRAC2012-Rule-17.5

(Required) The function argument corresponding to a parameter declared to have an array type shall have an appropriate number of elements.

MISRAC2012-Rule-17.6

(Mandatory) The declaration of an array parameter shall not contain the static keyword between the [ ]

MISRAC2012-Rule-17.7

(Required) The value returned by a function having non-void return type shall be used

MISRAC2012-Rule-17.8

(Advisory) A function parameter should not be modified.

MISRAC2012-Rule-17.9

(Mandatory) A function declared with a _Noreturn function specifier shall not return to its caller.

MISRAC2012-Rule-17.10

(Required) A function declared with a _Noreturn function specifier shall have void return type.

MISRAC2012-Rule-17.11

(Advisory) A function that never returns should be declared with a _Noreturn function specifier.

MISRAC2012-Rule-17.12

(Advisory) A function identifier should only be used with either a preceding &, or with a parenthesized parameter list.

MISRAC2012-Rule-17.13

(Required) A function type shall not be type qualified.

MISRAC2012-Rule-18.1_a

(Required) A pointer resulting from arithmetic on a pointer operand shall address an element of the same array as that pointer operand

MISRAC2012-Rule-18.1_b

(Required) A pointer resulting from arithmetic on a pointer operand shall address an element of the same array as that pointer operand

MISRAC2012-Rule-18.1_c

(Required) A pointer resulting from arithmetic on a pointer operand shall address an element of the same array as that pointer operand

MISRAC2012-Rule-18.1_d

(Required) A pointer resulting from arithmetic on a pointer operand shall address an element of the same array as that pointer operand

MISRAC2012-Rule-18.2

(Required) Subtraction between pointers shall only be applied to pointers that address elements of the same array. Note: This rule will only accept arrays of the form '<type> <name>[<size>]'.

MISRAC2012-Rule-18.3

(Required) The relational operators >, >=, < and <= shall not be applied to objects of pointer type except where they point into the same object.

MISRAC2012-Rule-18.4

(Required) The +, -, += and -= operators should not be applied to an expression of pointer type.

MISRAC2012-Rule-18.5

(Advisory) Declarations should contain no more than two levels of pointer nesting

MISRAC2012-Rule-18.6_a

(Required) The address of an object with automatic storage shall not be copied to another object that persists after the first object has ceased to exist

MISRAC2012-Rule-18.6_b

(Required) The address of an object with automatic storage shall not be copied to another object that persists after the first object has ceased to exist

MISRAC2012-Rule-18.6_c

(Required) The address of an object with automatic storage shall not be copied to another object that persists after the first object has ceased to exist

MISRAC2012-Rule-18.6_d

(Required) The address of an object with automatic storage shall not be copied to another object that persists after the first object has ceased to exist

MISRAC2012-Rule-18.7

(Required) Flexible array members shall not be declared

MISRAC2012-Rule-18.8

(Required) Variable-length array types shall not be used

MISRAC2012-Rule-18.9

(Required) An object with temporary lifetime shall not undergo array-to-pointer conversion

MISRAC2012-Rule-18.10

(Mandatory) Pointers to variably-modified array types shall not be used

MISRAC2012-Rule-19.1

(Mandatory) An object shall not be assigned or copied to an overlapping object

MISRAC2012-Rule-19.2

(Advisory) The union keyword should not be used

MISRAC2012-Rule-20.1

(Advisory) #include directives should only be preceded by preprocessor directives or comments.

MISRAC2012-Rule-20.2

(Required) The ',' or characters and the /* or // character sequences shall not occur in a header file name

MISRAC2012-Rule-20.4_c89

(Required) A macro shall not be defined with the same name as a keyword

MISRAC2012-Rule-20.4_c99

(Required) A macro shall not be defined with the same name as a keyword

MISRAC2012-Rule-20.5

(Advisory) #undef should not be used

MISRAC2012-Rule-20.6_a

(Required) Tokens that look like a preprocessing directive shall not occur within a macro argument.

MISRAC2012-Rule-20.6_b

(Required) Tokens that look like a preprocessing directive shall not occur within a macro argument.

MISRAC2012-Rule-20.7

(Required) The expansion of macro parameters shall be enclosed in parentheses.

MISRAC2012-Rule-20.10

(Advisory) The # and ## preprocessor operators should not be used

MISRAC2012-Rule-20.11

(Required) A macro parameter immediately following a # operator shall not immediately be followed by a ## operator.

MISRAC2012-Rule-20.13

(Required) A line whose first token is # shall be a valid preprocessing directive.

MISRAC2012-Rule-20.14

(Required) All #else, #elif, and #endif preprocessor directives shall reside in the same file as the #if, #ifdef, or #ifndef directive to which they are related.

MISRAC2012-Rule-21.1

(Required) #define and #undef shall not be used on a reserved identifier or reserved macro name

MISRAC2012-Rule-21.2

(Required) A reserved identifier or macro name shall not be declared

MISRAC2012-Rule-21.3

(Required) The memory allocation and deallocation functions of <stdlib.h> shall not be used.

MISRAC2012-Rule-21.4

(Required) The standard header file setjmp.h shall not be used

MISRAC2012-Rule-21.5

(Required) The standard header file signal.h shall not be used

MISRAC2012-Rule-21.6

(Required) The Standard Library input/output functions shall not be used

MISRAC2012-Rule-21.7

(Required) The atof, atoi, atol and atoll functions of stdlib.h shall not be used

MISRAC2012-Rule-21.8

(Required) The Standard Library termination functions of <stdlib.h> shall not be used.

MISRAC2012-Rule-21.9

(Required) The library functions bsearch and qsort of stdlib.h shall not be used

MISRAC2012-Rule-21.10

(Required) The Standard Library time and date functions shall not be used

MISRAC2012-Rule-21.11

(Advisory) The standard header file tgmath.h should not be used

MISRAC2012-Rule-21.12_a

(Required) The exception-handling features of <fenv.h> should not be used.

MISRAC2012-Rule-21.12_b

(Required) The exception handling features of <fenv.h> shall not be used.

MISRAC2012-Rule-21.12_c

(Required) The standard header file <fenv.h> shall not be used.

MISRAC2012-Rule-21.13

(Mandatory) The relevant functions from <ctype.h> are defined to take an int argument where the expected value is either in the range of an unsigned char or is a negative value equivalent to EOF. The use of any other values results in undefined behaviour.

MISRAC2012-Rule-21.14

(Required) The Standard Library function memcmp shall not be used to compare null terminated strings. If the length of either of the two strings is less than n, then they may compare as different even when they are logically the same.

MISRAC2012-Rule-21.15

(Required) The pointer arguments to the Standard Library functions memcpy, memmove and memcmp shall be pointers to qualified or unqualified versions of compatible types.

MISRAC2012-Rule-21.16

(Required) The pointer arguments to the Standard Library function memcmp shall point to either a pointer type, an essentially signed type, an essentially unsigned type, an essentially Boolean type or an essentially enum type

MISRAC2012-Rule-21.17_a

(Mandatory) Use of the string handling functions from <string.h> shall not result in accesses beyond the bounds of the objects referenced by their pointer parameters.

MISRAC2012-Rule-21.17_b

(Mandatory) Use of the string handling functions from <string.h> shall not result in accesses beyond the bounds of the objects referenced by their pointer parameters.

MISRAC2012-Rule-21.17_c

(Mandatory) Use of the string handling functions from <string.h> shall not result in accesses beyond the bounds of the objects referenced by their pointer parameters.

MISRAC2012-Rule-21.17_d

(Mandatory) Use of the string handling functions from <string.h> shall not result in accesses beyond the bounds of the objects referenced by their pointer parameters.

MISRAC2012-Rule-21.17_e

(Mandatory) Use of the string handling functions from <string.h> shall not result in accesses beyond the bounds of the objects referenced by their pointer parameters.

MISRAC2012-Rule-21.17_f

(Mandatory) Use of the string handling functions from <string.h> shall not result in accesses beyond the bounds of the objects referenced by their pointer parameters.

MISRAC2012-Rule-21.18_a

(Mandatory) The size_t argument passed to any function in <string.h> shall have an appropriate value.

MISRAC2012-Rule-21.18_b

(Mandatory) The size_t argument passed to any function in <string.h> shall have an appropriate value

MISRAC2012-Rule-21.19_a

(Mandatory) The pointers returned by the Standard Library functions localeconv, getenv, setlocale or, strerror shall only be used as if they have pointer to const-qualified type.

MISRAC2012-Rule-21.19_b

(Mandatory) The pointers returned by the Standard Library functions localeconv, getenv, setlocale or, strerror shall only be used as if they have pointer to const-qualified type.

MISRAC2012-Rule-21.20

(Mandatory) The pointer returned by the Standard Library functions asctime, ctime, gmtime, localtime, localeconv, getenv, setlocale or strerror shall not be used following a subsequent call to the same function.

MISRAC2012-Rule-21.21

(Required) The Standard Library function system of <stdlib.h> shall not be used.

MISRAC2012-Rule-21.22

(Mandatory) All operand arguments to any type-generic macros declared in <tgmath.h> shall have an appropriate essential type.

MISRAC2012-Rule-21.23

(Required) All operand arguments to any multi-argument type-generic macros declared in <tgmath.h> shall have the same standard type.

MISRAC2012-Rule-21.24

(Required) The random number generator functions of <stdlib.h> shall not be used

MISRAC2012-Rule-21.25

(Required) All memory synchronization operations shall be executed in sequentially consistent order

MISRAC2012-Rule-22.1_a

(Required) All resources obtained dynamically by means of Standard Library functions shall be explicitly released

MISRAC2012-Rule-22.1_b

(Required) All resources obtained dynamically by means of Standard Library functions shall be explicitly released

MISRAC2012-Rule-22.2_a

(Mandatory) A block of memory shall only be freed if it was allocated by means of a Standard Library function

MISRAC2012-Rule-22.2_b

(Mandatory) A block of memory shall only be freed if it was allocated by means of a Standard Library function

MISRAC2012-Rule-22.2_c

(Mandatory) A block of memory shall only be freed if it was allocated by means of a Standard Library function

MISRAC2012-Rule-22.3

(Required) The same file shall not be open for read and write access at the same time on different streams.

MISRAC2012-Rule-22.4

(Mandatory) There shall be no attempt to write to a stream which has been opened as read-only

MISRAC2012-Rule-22.5_a

(Mandatory) A pointer to a FILE object shall not be dereferenced

MISRAC2012-Rule-22.5_b

(Mandatory) A pointer to a FILE object shall not be dereferenced

MISRAC2012-Rule-22.6

(Mandatory) The value of a pointer to a FILE shall not be used after the associated stream has been closed

MISRAC2012-Rule-22.7_a

(Required) The macro EOF shall only be compared with the unmodified return value from any Standard Library function capable of returning EOF

MISRAC2012-Rule-22.7_b

The macro EOF shall only be compared with the unmodified return value from any Standard Library function capable of returning EOF

MISRAC2012-Rule-22.8

(Required) The value of errno shall be set to zero prior to a call to an errno-setting-function.

MISRAC2012-Rule-22.9

(Required) The value of errno shall be tested against zero after calling an errno-setting-function.

MISRAC2012-Rule-22.10

(Required) The value of errno shall only be tested when the last function to be called was an errno-setting-function.

MISRAC2012-Rule-23.1

(Advisory) A generic selection should only be expanded from a macro.

MISRAC2012-Rule-23.2

(Required) A generic selection that is not expanded from a macro shall not contain potential side effects in the controlling expression.

MISRAC2012-Rule-23.3

(Advisory) A generic selection should contain at least one non-default association.

MISRAC2012-Rule-23.4

(Advisory) A generic association shall list an appropriate type.

MISRAC2012-Rule-23.5

(Advisory) A generic selection should not depend on implicit pointer type conversion.

MISRAC2012-Rule-23.6

(Required) The controlling expression of a generic selection shall have an essential type that matches its standard type.

MISRAC2012-Rule-23.7

(Advisory) A generic selection that is expanded from a macro should evaluate its argument only once.

MISRAC2012-Rule-23.8

(Required) A default association shall appear as either the first or the last association of a generic selection.

MISRAC++2008-0-1-1

(Required) A project shall not contain unreachable code.

MISRAC++2008-0-1-2_a

(Required) A project shall not contain infeasible paths.

MISRAC++2008-0-1-2_b

(Required) A project shall not contain infeasible paths.

MISRAC++2008-0-1-2_c

(Required) A project shall not contain infeasible paths.

MISRAC++2008-0-1-3

(Required) A project shall not contain unused variables.

MISRAC++2008-0-1-4_a

(Required) A project shall not contain non-volatile POD variables having only one use.

MISRAC++2008-0-1-4_b

(Required) A project shall not contain non-volatile POD variables having only one use.

MISRAC++2008-0-1-5

(Required) A project shall not contain unused type declarations.

MISRAC++2008-0-1-6

(Required) A project shall not contain instances of non-volatile variables being given values that are never subsequently used.

MISRAC++2008-0-1-7

(Required) The value returned by a function having a non-void return type that is not an overloaded operator shall always be used.

MISRAC++2008-0-1-8

(Required) All functions with void return type shall have external side effect(s).

MISRAC++2008-0-1-9

(Required) There shall be no dead code.

MISRAC++2008-0-1-11

(Required) There shall be no unused parameters (named or unnamed) in nonvirtual functions.

MISRAC++2008-0-1-12

(Required) There shall be no unused parameters (named or unnamed) in the set of parameters for a virtual function and all the functions that override it.

MISRAC++2008-0-2-1

(Required) An object shall not be assigned to an overlapping object.

MISRAC++2008-0-3-2

(Required) If a function generates error information, then that error information shall be tested.

MISRAC++2008-2-7-1

(Required) The character sequence /* shall not be used within a C-style comment.

MISRAC++2008-2-7-2

(Required) Sections of code shall not be "commented out" using C-style comments.

MISRAC++2008-2-7-3

(Advisory) Sections of code should not be "commented out" using C++ comments.

MISRAC++2008-2-10-1

(Required) Different identifiers shall be typographically unambiguous.

MISRAC++2008-2-10-2

(Required) Identifiers declared in an inner scope shall not hide an identifier declared in an outer scope.

MISRAC++2008-2-10-3

(Required) A typedef name (including qualification, if any) shall be a unique identifier. This is a link analysis check.

MISRAC++2008-2-10-4

(Required) A class, union or enum name (including qualification, if any) shall be a unique identifier. This is a link analysis check.

MISRAC++2008-2-10-5

(Advisory) The identifier name of a non-member object or function with static storage duration should not be reused.

MISRAC++2008-2-10-6

(Required) If an identifier refers to a type, it shall not also refer to an object or a function in the same scope.

MISRAC++2008-2-13-1

(Required) Only those escape sequences that are defined in ISO/IEC 14882:2003 shall be used.

MISRAC++2008-2-13-2

(Required) Octal constants (other than zero) and octal escape sequences (other than 0) shall not be used.

MISRAC++2008-2-13-3

(Required) A "U" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type.

MISRAC++2008-2-13-4_a

(Required) Literal suffixes shall be upper case.

MISRAC++2008-2-13-4_b

(Required) Literal suffixes shall be upper case.

MISRAC++2008-2-13-5

(Required) Narrow and wide string literals shall not be concatenated.

MISRAC++2008-3-1-1_a

(Required) It shall be possible to include any header file in multiple translation units without violating the One Definition Rule.

MISRAC++2008-3-1-1_b

(Required) It shall be possible to include any header file in multiple translation units without violating the One Definition Rule.

MISRAC++2008-3-1-2

(Required) Functions shall not be declared at block scope.

MISRAC++2008-3-1-3

(Required) When an array is declared, its size shall either be stated explicitly or defined implicitly by initialization.

MISRAC++2008-3-2-1

(Required) All declarations of an object or function shall have compatible types.

MISRAC++2008-3-2-2

(Required) The One Definition Rule shall not be violated. This is a link analysis check.

MISRAC++2008-3-2-3_a

(Required) A type, object or function that is used in multiple translation units shall be declared in one and only one file.

MISRAC++2008-3-2-3_b

(Required) A type, object or function that is used in multiple translation units shall be declared in one and only one file. This is a link analysis check.

MISRAC++2008-3-2-4

(Required) An identifier with external linkage shall have exactly one definition. This is a link analysis check.

MISRAC++2008-3-3-1

(Required) Objects or functions with external linkage shall be declared in a header file.

MISRAC++2008-3-9-2

(Advisory) typedefs that indicate size and signedness should be used in place of the basic numerical types.

MISRAC++2008-3-9-3

(Required) The underlying bit representations of floating-point values shall not be used.

MISRAC++2008-4-5-1

(Required) Expressions with type bool shall not be used as operands to built-in operators other than the assignment operator =, the logical operators &&, ||, !, the equality operators == and !=, the unary & operator, and the conditional operator.

MISRAC++2008-4-5-2

(Required) Expressions with type enum shall not be used as operands to builtin operators other than the subscript operator [ ], the assignment operator =, the equality operators == and !=, the unary & operator, and the relational operators <, <=, >, >=.

MISRAC++2008-4-5-3

(Required) Expressions with type (plain) char and wchar_t shall not be used as operands to built-in operators other than the assignment operator =, the equality operators == and !=, and the unary & operator.

MISRAC++2008-5-0-1_a

(Required) The value of an expression shall be the same under any order of evaluation that the standard permits.

MISRAC++2008-5-0-1_b

(Required) The value of an expression shall be the same under any order of evaluation that the standard permits.

MISRAC++2008-5-0-1_c

(Required) The value of an expression shall be the same under any order of evaluation that the standard permits.

MISRAC++2008-5-0-2

(Advisory) Limited dependence should be placed on C++ operator precedence rules in expressions.

MISRAC++2008-5-0-3

(Required) A cvalue expression shall not be implicitly converted to a different underlying type.

MISRAC++2008-5-0-4

(Required) An implicit integral conversion shall not change the signedness of the underlying type.

MISRAC++2008-5-0-5

(Required) There shall be no implicit floating-integral conversions.

MISRAC++2008-5-0-6

(Required) An implicit integral or floating-point conversion shall not reduce the size of the underlying type.

MISRAC++2008-5-0-7

(Required) There shall be no explicit floating-integral conversions of a cvalue expression.

MISRAC++2008-5-0-8

(Required) An explicit integral or floating-point conversion shall not increase the size of the underlying type of a cvalue expression.

MISRAC++2008-5-0-9

(Required) An explicit integral conversion shall not change the signedness of the underlying type of a cvalue expression.

MISRAC++2008-5-0-10

(Required) If the bitwise operators ~ and << are applied to an operand with an underlying type of unsigned char or unsigned short, the result shall be immediately cast to the underlying type of the operand.

MISRAC++2008-5-0-13_a

(Required) The condition of an if-statement and the condition of an iteration-statement shall have type bool.

MISRAC++2008-5-0-13_b

(Required) The condition of an if-statement and the condition of an iteration-statement shall have type bool.

MISRAC++2008-5-0-13_c

(Required) The condition of an if-statement and the condition of an iteration-statement shall have type bool.

MISRAC++2008-5-0-13_d

(Required) The condition of an if-statement and the condition of an iteration-statement shall have type bool.

MISRAC++2008-5-0-14

(Required) The first operand of a conditional-operator shall have type bool.

MISRAC++2008-5-0-15_a

(Required) Array indexing shall be the only form of pointer arithmetic.

MISRAC++2008-5-0-15_b

(Required) Array indexing shall be the only form of pointer arithmetic.

MISRAC++2008-5-0-16_a

(Required) A pointer operand and any pointer resulting from pointer arithmetic using that operand shall both address elements of the same array.

MISRAC++2008-5-0-16_b

(Required) A pointer operand and any pointer resulting from pointer arithmetic using that operand shall both address elements of the same array.

MISRAC++2008-5-0-16_c

(Required) A pointer operand and any pointer resulting from pointer arithmetic using that operand shall both address elements of the same array.

MISRAC++2008-5-0-16_d

(Required) A pointer operand and any pointer resulting from pointer arithmetic using that operand shall both address elements of the same array.

MISRAC++2008-5-0-16_e

(Required) A pointer operand and any pointer resulting from pointer arithmetic using that operand shall both address elements of the same array.

MISRAC++2008-5-0-16_f

(Required) A pointer operand and any pointer resulting from pointer arithmetic using that operand shall both address elements of the same array.

MISRAC++2008-5-0-17

(Required) Subtraction between pointers shall only be applied to pointers that address elements of the same array.

MISRAC++2008-5-0-18

(Required) >, >=, <, <= shall not be applied to objects of pointer type, except where they point to the same array.

MISRAC++2008-5-0-19

(Required) The declaration of objects shall contain no more than two levels of pointer indirection.

MISRAC++2008-5-0-21

(Required) Bitwise operators shall only be applied to operands of unsigned underlying type.

MISRAC++2008-5-2-2

(Required) A pointer to a virtual base class shall only be cast to a pointer to a derived class by means of dynamic_cast.

MISRAC++2008-5-2-4

(Required) C-style casts (other than void casts) and functional notation casts (other than explicit constructor calls) shall not be used.

MISRAC++2008-5-2-5

(Required) A cast shall not remove any const or volatile qualification from the type of a pointer or reference.

MISRAC++2008-5-2-6

(Required) A cast shall not convert a pointer to a function to any other pointer type, including a pointer to function type.

MISRAC++2008-5-2-7

(Required) An object with pointer type shall not be converted to an unrelated pointer type, either directly or indirectly.

MISRAC++2008-5-2-8

(Required) An object with integer type or pointer to void type shall not be converted to an object with pointer type.

MISRAC++2008-5-2-9

(Advisory) A cast should not convert a pointer type to an integral type.

MISRAC++2008-5-2-10

(Advisory) The increment (++) and decrement (--) operators should not be mixed with other operators in an expression.

MISRAC++2008-5-2-11_a

(Required) The comma operator, && operator and the || operator shall not be overloaded.

MISRAC++2008-5-2-11_b

(Required) The comma operator, && operator and the || operator shall not be overloaded.

MISRAC++2008-5-2-12

(Required) An identifier with array type passed as a function argument shall not decay to a pointer.

MISRAC++2008-5-3-1

(Required) Each operand of the ! operator, the logical && or the logical || operators shall have type bool.

MISRAC++2008-5-3-2

(Required) The unary minus operator shall not be applied to an expression whose underlying type is unsigned.

MISRAC++2008-5-3-3

(Required) The unary & operator shall not be overloaded.

MISRAC++2008-5-3-4

(Required) Evaluation of the operand to the sizeof operator shall not contain side effects.

MISRAC++2008-5-8-1

(Required) The right hand operand of a shift operator shall lie between zero and one less than the width in bits of the underlying type of the left hand operand.

MISRAC++2008-5-14-1

(Required) The right hand operand of a logical && or || operator shall not contain side effects.

MISRAC++2008-5-18-1

(Required) The comma operator shall not be used.

MISRAC++2008-5-19-1

(Advisory) Evaluation of constant unsigned integer expressions should not lead to wrap-around.

MISRAC++2008-6-2-1

(Required) Assignment operators shall not be used in sub-expressions.

MISRAC++2008-6-2-2

(Required) Floating-point expressions shall not be directly or indirectly tested for equality or inequality.

MISRAC++2008-6-2-3

(Required) Before preprocessing, a null statement shall only occur on a line by itself; it may be followed by a comment, provided that the first character following the null statement is a white-space character.

MISRAC++2008-6-3-1_a

(Required) The statement forming the body of a switch, while, do ... while or for statement shall be a compound statement.

MISRAC++2008-6-3-1_b

(Required) The statement forming the body of a switch, while, do ... while or for statement shall be a compound statement.

MISRAC++2008-6-3-1_c

(Required) The statement forming the body of a switch, while, do ... while or for statement shall be a compound statement.

MISRAC++2008-6-3-1_d

(Required) The statement forming the body of a switch, while, do ... while or for statement shall be a compound statement.

MISRAC++2008-6-4-1

(Required) An if ( condition ) construct shall be followed by a compound statement. The else keyword shall be followed by either a compound statement, or another if statement.

MISRAC++2008-6-4-2

(Required) All if ... else if constructs shall be terminated with an else clause.

MISRAC++2008-6-4-3

(Required) A switch statement shall be a well-formed switch statement.

MISRAC++2008-6-4-4

(Required) A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statement.

MISRAC++2008-6-4-5

(Required) An unconditional throw or break statement shall terminate every non-empty switch-clause.

MISRAC++2008-6-4-6

(Required) The final clause of a switch statement shall be the default-clause.

MISRAC++2008-6-4-7

(Required) The condition of a switch statement shall not have bool type.

MISRAC++2008-6-4-8

(Required) Every switch statement shall have at least one case-clause.

MISRAC++2008-6-5-1_a

(Required) A for loop shall contain a single loop-counter which shall not have floating type.

MISRAC++2008-6-5-1_b

(Required) A for loop shall contain a single loop-counter which shall not have floating type.

MISRAC++2008-6-5-2

(Required) If loop-counter is not modified by -- or ++, then, within condition, the loop-counter shall only be used as an operand to <=, <, > or >=.

MISRAC++2008-6-5-3

(Required) The loop-counter shall not be modified within condition or statement.

MISRAC++2008-6-5-4

(Required) The loop-counter shall be modified by one of: --, ++, -=n, or +=n; where n remains constant for the duration of the loop.

MISRAC++2008-6-5-5

(Required) A loop-control-variable other than the loop-counter shall not be modified within condition or expression.

MISRAC++2008-6-5-6

(Required) A loop-control-variable other than the loop-counter which is modified in statement shall have type bool.

MISRAC++2008-6-6-1

(Required) Any label referenced by a goto statement shall be declared in the same block, or in a block enclosing the goto statement.

MISRAC++2008-6-6-2

(Required) The goto statement shall jump to a label declared later in the same function body.

MISRAC++2008-6-6-4

(Required) For any iteration statement there shall be no more than one break or goto statement used for loop termination.

MISRAC++2008-6-6-5

(Required) A function shall have a single point of exit at the end of the function.

MISRAC++2008-7-1-1

(Required) A variable which is not modified shall be const qualified.

MISRAC++2008-7-1-2

(Required) A pointer or reference parameter in a function shall be declared as pointer to const or reference to const if the corresponding object is not modified.

MISRAC++2008-7-2-1

(Required) An expression with enum underlying type shall only have values corresponding to the enumerators of the enumeration.

MISRAC++2008-7-3-1

(Required) The global namespace shall only contain main, namespace declarations and extern C declarations.

MISRAC++2008-7-3-2

(Required) The identifier main shall not be used for a function other than the global function main.

MISRAC++2008-7-3-3

(Required) There shall be no unnamed namespaces in header files.

MISRAC++2008-7-4-3

(Required) Assembler language shall be encapsulated and isolated.

MISRAC++2008-7-5-1_a

(Required) A function shall not return a reference or a pointer to an automatic variable (including parameters), defined within the function.

MISRAC++2008-7-5-1_b

(Required) A function shall not return a reference or a pointer to an automatic variable (including parameters), defined within the function.

MISRAC++2008-7-5-2_a

(Required) The address of an object with automatic storage shall not be assigned to another object that may persist after the first object has ceased to exist.

MISRAC++2008-7-5-2_b

(Required) The address of an object with automatic storage shall not be assigned to another object that may persist after the first object has ceased to exist.

MISRAC++2008-7-5-2_c

(Required) The address of an object with automatic storage shall not be assigned to another object that may persist after the first object has ceased to exist.

MISRAC++2008-7-5-2_d

(Required) The address of an object with automatic storage shall not be assigned to another object that may persist after the first object has ceased to exist.

MISRAC++2008-7-5-4_a

(Advisory) Functions should not call themselves, either directly or indirectly.

MISRAC++2008-7-5-4_b

(Advisory) Functions should not call themselves, either directly or indirectly. This is a link analysis check.

MISRAC++2008-8-0-1

(Required) An init-declarator-list or a member-declarator-list shall consist of a single init-declarator or member-declarator respectively.

MISRAC++2008-8-3-1

(Required) Parameters in an overriding virtual function shall either use the same default arguments as the function they override, or else shall not specify any default arguments.

MISRAC++2008-8-4-1

(Required) Functions shall not be defined using the ellipsis notation.

MISRAC++2008-8-4-2_a

(Required) The identifiers used for the parameters in a re-declaration of a function shall be identical to those in the declaration. This is a link analysis check.

MISRAC++2008-8-4-2_b

(Required) The identifiers used for the parameters in a re-declaration of a function shall be identical to those in the declaration.

MISRAC++2008-8-4-3

(Required) All exit paths from a function with non-void return type shall have an explicit return statement with an expression.

MISRAC++2008-8-4-4

(Required) A function identifier shall either be used to call the function or it shall be preceded by &.

MISRAC++2008-8-5-1_a

(Required) All variables shall have a defined value before they are used.

MISRAC++2008-8-5-1_b

(Required) All variables shall have a defined value before they are used.

MISRAC++2008-8-5-1_c

(Required) All variables shall have a defined value before they are used.

MISRAC++2008-8-5-2

(Required) Braces shall be used to indicate and match the structure in the nonzero initialization of arrays and structures.

MISRAC++2008-9-3-1

(Required) const member functions shall not return non-const pointers or references to class-data.

MISRAC++2008-9-3-2

(Required) Member functions shall not return non-const handles to class-data.

MISRAC++2008-9-5-1

(Required) Unions shall not be used.

MISRAC++2008-9-6-2

(Required) Bit-fields shall be either bool type or an explicitly unsigned or signed integral type.

MISRAC++2008-9-6-3

(Required) Bit-fields shall not have enum type.

MISRAC++2008-9-6-4

(Required) Named bit-fields with signed integer type shall have a length of more than one bit.

MISRAC++2008-10-1-1

(Advisory) Classes should not be derived from virtual bases.

MISRAC++2008-10-1-3

(Required) An accessible base class shall not be both virtual and non-virtual in the same hierarchy

MISRAC++2008-12-1-1_a

(Required) An object's dynamic type shall not be used from the body of its constructor or destructor.

MISRAC++2008-12-1-1_b

(Required) An object's dynamic type shall not be used from the body of its constructor or destructor.

MISRAC++2008-12-1-3

(Required) All constructors that are callable with a single argument of fundamental type shall be declared explicit.

MISRAC++2008-14-6-1

(Required) In a class template with a dependent base, any name that may be found in that dependent base shall be referred to using a qualified-id or this->.

MISRAC++2008-15-0-2

(Advisory) An exception object should not have pointer type.

MISRAC++2008-15-1-2

(Required) NULL shall not be thrown explicitly.

MISRAC++2008-15-1-3

(Required) An empty throw (throw;) shall only be used in the compound-statement of a catch handler.

MISRAC++2008-15-3-1

(Required) Exceptions shall be raised only after start-up and before termination of the program.

MISRAC++2008-15-3-2

(Advisory) There should be at least one exception handler to catch all otherwise unhandled exceptions

MISRAC++2008-15-3-3

(Required) Handlers of a function-try-block implementation of a class constructor or destructor shall not reference non-static members from this class or its bases.

MISRAC++2008-15-3-4

(Required) Each exception explicitly thrown in the code shall have a handler of a compatible type in all call paths that could lead to that point.

MISRAC++2008-15-3-5

(Required) A class type exception shall always be caught by reference.

MISRAC++2008-15-5-1

(Required) A class destructor shall not exit with an exception.

MISRAC++2008-16-0-1

(Required) #include directives in a file shall only be preceded by other preprocessor directives or comments.

MISRAC++2008-16-0-3

(Required) #undef shall not be used.

MISRAC++2008-16-0-4

(Required) Function-like macros shall not be defined.

MISRAC++2008-16-2-2

(Required) C++ macros shall only be used for: include guards, type qualifiers, or storage class specifiers.

MISRAC++2008-16-2-3

(Required) Include guards shall be provided.

MISRAC++2008-16-2-4

(Required) The ', ", /* or // characters shall not occur in a header file name.

MISRAC++2008-16-2-5

(Advisory) The backslash character should not occur in a header file name.

MISRAC++2008-16-3-1

(Required) There shall be at most one occurrence of the # or ## operators in a single macro definition.

MISRAC++2008-16-3-2

(Advisory) The # and ## operators should not be used.

MISRAC++2008-17-0-1

(Required) Reserved identifiers, macros and functions in the standard library shall not be defined, redefined or undefined.

MISRAC++2008-17-0-3

(Required) The names of standard library functions shall not be overridden.

MISRAC++2008-17-0-5

(Required) The setjmp macro and the longjmp function shall not be used.

MISRAC++2008-18-0-1

(Required) The C library shall not be used.

MISRAC++2008-18-0-2

(Required) The library functions atof, atoi and atol from library cstdlib shall not be used.

MISRAC++2008-18-0-3

(Required) The library functions abort, exit, getenv and system from library cstdlib shall not be used.

MISRAC++2008-18-0-4

(Required) The time handling functions of library ctime shall not be used.

MISRAC++2008-18-0-5

(Required) The unbounded functions of library <cstring> shall not be used.

MISRAC++2008-18-2-1

(Required) The macro offsetof shall not be used.

MISRAC++2008-18-4-1

(Required) Dynamic heap memory allocation shall not be used.

MISRAC++2008-18-7-1

(Required) The signal handling facilities of csignal shall not be used.

MISRAC++2008-19-3-1

(Required) The error indicator errno shall not be used.

MISRAC++2008-27-0-1

(Required) The stream input/output library cstdio shall not be used.

MISRAC++2023-0.0.1

(Required) A function shall not contain unreachable statements.

MISRAC++2023-0.0.2_a

(Advisory) Controlling expressions should not be invariant

MISRAC++2023-0.0.2_b

(Advisory) Controlling expressions should not be invariant.

MISRAC++2023-0.0.2_c

(Advisory) Controlling expressions should not be invariant

MISRAC++2023-0.1.1_a

(Advisory) A value should not be unnecessarily written to a local object

MISRAC++2023-0.1.1_b

(Advisory) A value should not be unnecessarily written to a local object

MISRAC++2023-0.1.2

(Required) The value returned by a function shall be used

MISRAC++2023-0.2.1

(Advisory) Variables with limited visibility should be used at least once

MISRAC++2023-0.2.2_a

(Required) A named function parameter shall be used at least once

MISRAC++2023-0.2.2_b

(Required) A named function parameter shall be used at least once

MISRAC++2023-0.2.3

(Advisory) Types with limited visibility should be used at least once

MISRAC++2023-0.2.4

(Advisory) Functions with limited visibility should be used at least once This is a link analysis check.

MISRAC++2023-4.1.2_a

(Advisory) Deprecated features should not be used

MISRAC++2023-4.1.2_b

(Advisory) Deprecated features should not be used

MISRAC++2023-4.1.2_c

(Advisory) Deprecated features should not be used

MISRAC++2023-4.1.2_d

(Advisory) Deprecated features should not be used

MISRAC++2023-4.1.2_e

(Advisory) Deprecated features should not be used

MISRAC++2023-4.1.2_f

(Advisory) Deprecated features should not be used

MISRAC++2023-4.1.2_g

(Advisory) Deprecated features should not be used

MISRAC++2023-4.1.2_h

(Advisory) Deprecated features should not be used

MISRAC++2023-4.1.2_i

(Advisory) Deprecated features should not be used

MISRAC++2023-4.1.2_j

(Advisory) Deprecated features should not be used

MISRAC++2023-4.1.2_k

(Advisory) Deprecated features should not be used

MISRAC++2023-4.1.2_l

(Advisory) Deprecated features should not be used

MISRAC++2023-4.1.2_m

(Advisory) Deprecated features should not be used

MISRAC++2023-4.1.2_n

(Advisory) Deprecated features should not be used

MISRAC++2023-5.7.1

(Required) The character sequence /* shall not be used within a C-style comment

MISRAC++2023-5.7.2_a

(Advisory) Sections of code should not be "commented out"

MISRAC++2023-5.7.2_b

(Advisory) Sections of code should not be "commented out"

MISRAC++2023-5.7.3

(Required) Line-splicing shall not be used in // comments

MISRAC++2023-5.10.1

(Required) User-defined identifiers shall have an appropriate form

MISRAC++2023-5.13.1

(Required) Within character literals and non raw-string literals, \ shall only be used to form a defined escape sequence or universal character name

MISRAC++2023-5.13.2

(Required) Octal escape sequences, hexadecimal escape sequences and universal character names shall be terminated

MISRAC++2023-5.13.3

(Required) Octal constants shall not be used

MISRAC++2023-5.13.4

(Required) Unsigned integer literals shall be appropriately suffixed

MISRAC++2023-5.13.5

(Required) The lowercase form of L shall not be used as the first character in a literal suffix

MISRAC++2023-5.13.6

(Required) An integer-literal of type long long shall not use a single L or l in any suffix

MISRAC++2023-5.13.7

(Required) String literals with different encoding prefixes shall not be concatenated

MISRAC++2023-6.0.1_a

(Required) Block scope declarations shall not be visually ambiguous

MISRAC++2023-6.0.1_b

(Required) Block scope declarations shall not be visually ambiguous

MISRAC++2023-6.0.2

(Advisory) When an array with external linkage is declared, its size should be explicitly specified

MISRAC++2023-6.0.3

(Advisory) The only declarations in the global namespace should be main, namespace declarations and extern C declarations

MISRAC++2023-6.0.4

(Required) The identifier main shall not be used for a function other than the global function main.

MISRAC++2023-6.2.1

(Required) The one-definition rule shall not be violated This is a link analysis check.

MISRAC++2023-6.2.3_a

(Required) The source code used to implement an entity shall appear only once This is a link analysis check.

MISRAC++2023-6.2.3_b

(Required) The source code used to implement an entity shall appear only once

MISRAC++2023-6.2.4_a

(Required) A header file shall not contain definitions of functions or objects that are non-inline and have external linkage

MISRAC++2023-6.2.4_b

(Required) A header file shall not contain definitions of functions or objects that are non-inline and have external linkage

MISRAC++2023-6.4.1

(Required) A variable declared in an inner scope shall not hide a variable declared in an outer scope

MISRAC++2023-6.4.2

(Required) Derived classes shall not conceal functions that are inherited from their bases.

MISRAC++2023-6.4.3

(Required) A name that is present in a dependent base shall not be resolved by unqualified lookup

MISRAC++2023-6.5.1

(Advisory) A function or object with external linkage should be introduced in a header file

MISRAC++2023-6.5.2

(Advisory) Internal linkage should be specified appropriately.

MISRAC++2023-6.7.1

(Required) Local variables shall not have static storage duration

MISRAC++2023-6.7.2

(Required) Global variables shall not be used

MISRAC++2023-6.8.2_a

(Mandatory) A function must not return a reference or a pointer to a local variable with automatic storage duration

MISRAC++2023-6.8.2_b

(Mandatory) A function must not return a reference or a pointer to a local variable with automatic storage duration

MISRAC++2023-6.8.3_a

(Required) An assignment operator shall not assign the address of an object with automatic storage duration to an object with a greater lifetime

MISRAC++2023-6.8.3_b

(Required) An assignment operator shall not assign the address of an object with automatic storage duration to an object with a greater lifetime

MISRAC++2023-6.8.3_c

(Required) An assignment operator shall not assign the address of an object with automatic storage duration to an object with a greater lifetime

MISRAC++2023-6.8.3_d

(Required) An assignment operator shall not assign the address of an object with automatic storage duration to an object with a greater lifetime

MISRAC++2023-6.8.4

(Advisory) Member functions returning references to their object should be ref-qualified appropriately

MISRAC++2023-6.9.1

(Required) The same type aliases shall be used in all declarations of the same entity

MISRAC++2023-6.9.2

(Advisory) The names of the standard signed integer types and standard unsigned integer types should not be used

MISRAC++2023-7.0.1

(Required) There shall be no conversion from type bool

MISRAC++2023-7.0.2

(Required) There shall be no conversion to type bool

MISRAC++2023-7.0.3

(Required) The numerical value of a character shall not be used

MISRAC++2023-7.0.4

(Required) The operands of bitwise operators and shift operators shall be appropriate

MISRAC++2023-7.0.5

(Required) Integral promotion and the usual arithmetic conversions shall not change the signedness or the type category of an operand

MISRAC++2023-7.0.6_a

(Required) Assignment between numeric types shall be appropriate

MISRAC++2023-7.0.6_b

(Required) Assignment between numeric types shall be appropriate

MISRAC++2023-7.11.1

(Required) nullptr shall be the only form of the null-pointer-constant

MISRAC++2023-7.11.2

(Required) An array passed as a function argument shall not decay to a pointer

MISRAC++2023-7.11.3

(Required) A conversion from function type to pointer-to-function type shall only occur in appropriate contexts

MISRAC++2023-8.0.1

(Advisory) Parentheses should be used to make the meaning of an expression appropriately explicit

MISRAC++2023-8.1.1

(Required) A non-transient lambda shall not implicitly capture this

MISRAC++2023-8.1.2

(Advisory) Variables should be captured explicitly in a non-transient lambda

MISRAC++2023-8.2.1

(Required) A virtual base class shall only be cast to a derived class by means of dynamic_cast

MISRAC++2023-8.2.2

(Required) C-style casts and functional notation casts shall not be used

MISRAC++2023-8.2.3

(Required) A cast shall not remove any const or volatile qualification from the type accessed via a pointer or by reference

MISRAC++2023-8.2.4

(Required) Casts shall not be performed between a pointer to function and any other type

MISRAC++2023-8.2.5

(Required) reinterpret_cast shall not be used

MISRAC++2023-8.2.6

(Required) An object with integral, enumerated, or pointer to void type shall not be cast to a pointer type

MISRAC++2023-8.2.7

(Advisory) A cast should not convert a pointer type to an integral type

MISRAC++2023-8.2.8

(Required) An object pointer type shall not be cast to an integral type other than std::uintptr_t or std:intptr_t

MISRAC++2023-8.2.9

(Required) The operand to typeid shall not be an expression of polymorphic class type

MISRAC++2023-8.2.10_a

(Required) Functions shall not call themselves, either directly or indirectly

MISRAC++2023-8.2.10_b

(Required) Functions shall not call themselves, either directly or indirectly This is a link analysis check.

MISRAC++2023-8.2.11

(Required) An argument passed via ellipsis shall have an appropriate type

MISRAC++2023-8.3.1

(Advisory) The built-in unary - operator should not be applied to an expression of unsigned type

MISRAC++2023-8.3.2

(Advisory) The built-in unary + operator should not be used

MISRAC++2023-8.7.1_a

(Required) Pointer arithmetic shall not form an invalid pointer

MISRAC++2023-8.7.1_b

(Required) Pointer arithmetic shall not form an invalid pointer

MISRAC++2023-8.7.1_c

(Required) Pointer arithmetic shall not form an invalid pointer

MISRAC++2023-8.7.2

(Required) Subtraction between pointers shall only be applied to pointers that address elements of the same array

MISRAC++2023-8.9.1

(Required) The built-in relational operators >, >=, < and <= shall not be applied to objects of pointer type, except where they point to elements of the same array

MISRAC++2023-8.14.1

(Advisory) The right-hand operand of a logical && or || operator should not contain persistent side effects

MISRAC++2023-8.18.1

(Mandatory) An object or subobject must not be copied to an overlapping object

MISRAC++2023-8.18.2

(Advisory) The result of an assignment operator should not be used

MISRAC++2023-8.19.1

(Advisory) The comma operator should not be used

MISRAC++2023-8.20.1

(Advisory) An unsigned arithmetic operation with constant operands should not wrap

MISRAC++2023-9.2.1

(Required) An explicit type conversion shall not be an expression statement

MISRAC++2023-9.3.1_a

(Required) The body of an iteration-statement or a selection-statement shall be a compound-statement

MISRAC++2023-9.3.1_b

(Required) The body of an iteration-statement or a selection-statement shall be a compound-statement

MISRAC++2023-9.3.1_c

(Required) The body of an iteration-statement or a selection-statement shall be a compound-statement

MISRAC++2023-9.3.1_d

(Required) The body of an iteration-statement or a selection-statement shall be a compound-statement

MISRAC++2023-9.3.1_e

(Required) The body of an iteration-statement or a selection-statement shall be a compound-statement

MISRAC++2023-9.4.1

(Required) All if... elseif constructs shall be terminated with an else statement

MISRAC++2023-9.4.2_a

(Required) The structure of a switch statement shall be appropriate

MISRAC++2023-9.4.2_b

(Required) The structure of a switch statement shall be appropriate

MISRAC++2023-9.4.2_c

(Required) The structure of a switch statement shall be appropriate

MISRAC++2023-9.4.2_d

(Required) The structure of a switch statement shall be appropriate

MISRAC++2023-9.4.2_e

(Required) The structure of a switch statement shall be appropriate

MISRAC++2023-9.4.2_f

(Required) The structure of a switch statement shall be appropriate

MISRAC++2023-9.5.1_a

(Advisory) Legacy for statements should be simple

MISRAC++2023-9.5.1_b

(Advisory) Legacy for statements should be simple

MISRAC++2023-9.5.1_c

(Advisory) Legacy for statements should be simple

MISRAC++2023-9.5.1_d

(Advisory) Legacy for statements should be simple

MISRAC++2023-9.5.2

(Required) A for-range-initializer shall contain at most one function call

MISRAC++2023-9.6.1

(Advisory) The goto statement should not be used

MISRAC++2023-9.6.2

(Required) The goto statement shall jump to a label declared later in the function body

MISRAC++2023-9.6.3

(Required) The goto statement shall jump to a label declared later in the function body

MISRAC++2023-9.6.4

(Required) A function declared with the [[noreturn]] attribute shall not return

MISRAC++2023-9.6.5

(Required) A function with non-void return type shall return a value on all paths

MISRAC++2023-10.0.1

(Advisory) A declaration should not declare more than one variable or member variable

MISRAC++2023-10.1.1

(Advisory) The target type of a pointer or lvalue reference parameter should be const-qualified appropriately

MISRAC++2023-10.1.2

(Required) The volatile qualifier shall be used appropriately

MISRAC++2023-10.2.1

(Required) An enumeration shall be defined with an explicit underlying type

MISRAC++2023-10.2.2

(Advisory) Unscoped enumerations should not be declared

MISRAC++2023-10.2.3

(Required) The numeric value of an unscoped enumeration with no fixed underlying type shall not be used

MISRAC++2023-10.3.1

(Advisory) There should be no unnamed namespaces in header files

MISRAC++2023-10.4.1

(Required) The asm declaration shall not be used

MISRAC++2023-11.3.1

(Advisory) Variables of array type should not be declared

MISRAC++2023-11.3.2

(Advisory) The declaration of an object should contain no more than two levels of pointer indirection

MISRAC++2023-11.6.1

(Advisory) All variables should be initialized

MISRAC++2023-11.6.2

(Mandatory) The value of an object must not be read before it has been set

MISRAC++2023-11.6.3

(Required) Within an enumerator list, the value of an implicitly-specified enumeration constant shall be unique

MISRAC++2023-12.2.1

(Advisory) Bit-fields should not be declared

MISRAC++2023-12.2.2

(Required) A bit-field shall have an appropriate type

MISRAC++2023-12.2.3

(Required) A named bit-field with signed integer type shall not have a length of one bit

MISRAC++2023-12.3.1

(Required) The union keyword shall not be used

MISRAC++2023-13.1.1

(Advisory) Classes should not be inherited virtually

MISRAC++2023-13.1.2

(Required) An accessible base class shall not be both virtual and non-virtual in the same hierarchy

MISRAC++2023-13.3.1

(Required) User-declared member functions shall use the virtual, override and final specifiers appropriately

MISRAC++2023-13.3.2

(Required) Parameters in an overriding virtual function shall not specify different default arguments

MISRAC++2023-13.3.3_a

(Required) The parameters in all declarations or overrides of a function shall either be unnamed or have identical names This is a link analysis check.

MISRAC++2023-13.3.3_b

(Required) The parameters in all declarations or overrides of a function shall either be unnamed or have identical names

MISRAC++2023-13.3.4

(Required) A comparison of a potentially virtual pointer to member function shall only be with nullptr

MISRAC++2023-14.1.1

(Advisory) Non-static data members should be either all private or all public

MISRAC++2023-15.1.1_a

(Required) An object's dynamic type shall not be used from within its constructor or destructor

MISRAC++2023-15.1.1_b

(Required) An object's dynamic type shall not be used from within its constructor or destructor

MISRAC++2023-15.1.3

(Required) Conversion operators and constructors that are callable with a single argument shall be explicit

MISRAC++2023-16.5.1

(Required) The logical AND and logical OR operators shall not be overloaded

MISRAC++2023-16.5.2

(Required) The address-of operator shall not be overloaded

MISRAC++2023-18.1.1

(Required) An exception object shall not have pointer type

MISRAC++2023-18.1.2

(Required) An empty throw shall only occur within the compound-statement of a catch handler

MISRAC++2023-18.3.1

(Advisory) There should be at least one exception handler to catch all otherwise unhandled exceptions

MISRAC++2023-18.3.2

(Required) An exception of class type shall be caught by const reference or reference

MISRAC++2023-18.3.3

(Required) Handlers for a function-try-block of a constructor or destructor shall not refer to non-static members from their class or its bases

MISRAC++2023-19.0.2

(Required) Function-like macros shall not be defined

MISRAC++2023-19.0.3

(Advisory) #include directives should only be preceded by preprocessor directives or comments

MISRAC++2023-19.2.1

(Required) Precautions shall be taken in order to prevent the contents of a header file being included more than once

MISRAC++2023-19.2.3

(Required) The ' or" or \\ characters and the /* or // character sequences shall not occur in a header file name

MISRAC++2023-19.3.1

(Advisory) The # and ## preprocessor operators should not be used

MISRAC++2023-19.3.4

(Required) Parentheses shall be used to ensure macro arguments are expanded appropriately

MISRAC++2023-19.3.5_a

(Required) Tokens that look like a preprocessing directive shall not occur within a macro argument

MISRAC++2023-19.3.5_b

(Required) Tokens that look like a preprocessing directive shall not occur within a macro argument

MISRAC++2023-21.2.1

(Required) The library functions atof, atoi, atol and atoll from <cstdlib> shall not be used

MISRAC++2023-21.2.4

(Required) The macro offsetof shall not be used

MISRAC++2023-21.6.1_a

(Advisory) Dynamic memory should not be used

MISRAC++2023-21.10.3

(Required) The facilities provided by the standard header file <csignal> shall not be used

MISRAC++2023-30.0.1

(Required) The C Library input/output functions shall not be used

Table 174. Summary of checks