MISRA C++:2008 checker reference

These checkers detect violations of the MISRA C++:2008 standard.

Notes

  • To view this information organized by rule number, see MISRA C++:2008 rules mapped to Klocwork checkers.
  • We provide full help for each MISRA C and MISRA C++ checker. Because this information is licensed, it is available as a part of your Klocwork installation, rather than online.
Checker name Description Rule Version
CWARN.NOEFFECT.UCMP.GE Comparison of unsigned value against 0 is always true Rule 0-1-2 (req.) Pre-2020.1
CWARN.NOEFFECT.UCMP.GE.MACRO Comparison of unsigned value against 0 within a macro is always true Rule 0-1-2 (req.) Pre-2020.1
CWARN.NOEFFECT.UCMP.LT Comparison of unsigned value against 0 is always false Rule 0-1-2 (req.) Pre-2020.1
CWARN.NOEFFECT.UCMP.LT.MACRO Comparison of unsigned value against 0 within a macro is always false Rule 0-1-2 (req.) Pre-2020.1
FUNCRET.GEN Non-void function does not return value Rule 8-4-3 (req.) Pre-2020.1
LOCRET.ARG Function returns address of local variable Rule 7-5-2 (req.) Pre-2020.1
LOCRET.GLOB Function returns address of local variable Rule 7-5-2 (req.) Pre-2020.1
LOCRET.RET Function returns address of local variable Rule 7-5-1 (req.) Pre-2020.1
LV_UNUSED.GEN Local variable unused Rule 0-1-3 (req.) 2020.3
MISRA.ADDR.REF.PARAM Function returns reference to parameter passed by reference Rule 7-5-3 (req.) Pre-2020.1
MISRA.ADDR.REF.PARAM.PTR Function returns address of parameter passed by reference Rule 7-5-3 (req.) Pre-2020.1
MISRA.ASM.ENCAPS Assembly language is not isolated. Rule 7-4-3 (req.) Pre-2020.1
MISRA.ASSIGN.COND Assignment operator is used in a condition Rule 6-2-1 (req.) Pre-2020.1
MISRA.ASSIGN.OVERLAP Object is assigned to an overlapping object Rule 0-2-1 (req.) 2023.2
MISRA.ASSIGN.SUBEXPR Assignment operator is used in a sub-expression outside a condition Rule 6-2-1 (req.) Pre-2020.1
MISRA.BASE.IDS.UNIQUE Member name is used twice in inheritance hierarchy Rule 10-2-1 (adv.) Pre-2020.1
MISRA.BASE.MANYDEFS Both overriding and overridden virtual functions have definitions Rule 10-3-1 (req.) Pre-2020.1
MISRA.BASE.VIRTUAL.NOTVIRTUAL Base class is used as both virtual and not virtual in inheritance hierarchy Rule 10-1-3 (req.) Pre-2020.1
MISRA.BIN_OP.OVERLOAD Comma, || or && operator overloaded Rule 5-2-11 (req.) Pre-2020.1
MISRA.BITFIELD.SIGNED Length of a named signed bit-field is less than 2 Rule 9-6-4 (req.) Pre-2020.1
MISRA.BITFIELD.TYPE.CPP Type of bit-field is neither bool, nor signed/unsigned integer Rule 9-6-2 (req.) Pre-2020.1
MISRA.BITS.NOT_UNSIGNED Operand of bitwise operation is not unsigned integer Rule 5-0-21 (req.) Pre-2020.1
MISRA.BITS.NOT_UNSIGNED.PREP Operand of bitwise operation is not unsigned integer Rule 5-0-21 (req.) Pre-2020.1
MISRA.BITS.OPERAND Operands of bitwise operation have different underlying types Rule 5-0-20 (req.) Pre-2020.1
MISRA.BUILTIN_NUMERIC Builtin numeric type is used Rule 3-9-2 (adv.) Pre-2020.1
MISRA.CAST.CONST Cast operation removes const or volatile modifier from a pointer or reference Rule 5-2-5 (req.) Pre-2020.1
MISRA.CAST.FLOAT.WIDER Cast of floating point expression to a wider floating point type Rule 5-0-8 (req.) Pre-2020.1
MISRA.CAST.FLOAT_INT Cast of floating point expression to integral type Rule 5-0-7 (req.) Pre-2020.1
MISRA.CAST.FUNC_PTR.CPP Cast converts function pointer to other pointer type Rule 5-2-6 (req.) Pre-2020.1
MISRA.CAST.INT.SIGN Non-trivial integral expression is cast to type with different signedness Rule 5-0-9 (req.) Pre-2020.1
MISRA.CAST.INT.WIDER Cast of integral expression to a wider integral type Rule 5-0-8 (req.) Pre-2020.1
MISRA.CAST.INT_FLOAT Cast of integral expression to floating point type Rule 5-0-7 (req.) Pre-2020.1
MISRA.CAST.INT_TO_PTR Object with integer type or pointer to void cast to pointer type Rule 5-2-8 (req.) Pre-2020.1
MISRA.CAST.POLY.TYPE Cast from a polymorphic base class to a derived class Rule 5-2-3 (adv.) Pre-2020.1
MISRA.CAST.PTR.UNRELATED Object of pointer type cast to unrelated type Rule 5-2-7 (req.) 2023.2
MISRA.CAST.PTR.VRCLASS A cast form pointer to a virtual base class to pointer to a derived class does not use 'dynamic_cast' Rule 5-2-2 (req.) Pre-2020.1
MISRA.CAST.PTR_TO_INT Cast between a pointer and an integral type Rule 5-2-9 (adv.) Pre-2020.1
MISRA.CAST.UNSIGNED_BITS The result of bitwise operation on unsigned char or short is not cast back to original type Rule 5-0-10 (req.) Pre-2020.1
MISRA.CATCH.ALL No ellipsis exception handler in a try-catch block Rule 15-3-2 (adv.) Pre-2020.1
MISRA.CATCH.BY_VALUE Exception object of class type is caught by value Rule 15-3-5 (req.) Pre-2020.1
MISRA.CATCH.NOALL Ellipsis exception handler is not the last one in a try-catch block Rule 15-3-7 (req.) Pre-2020.1
MISRA.CATCH.WRONGORD Handler for a base exception class precedes to a handler for a derived exception class in a try-catch block Rule 15-3-6 (req.) Pre-2020.1
MISRA.CHAR.DIGRAPH Digraph usage Rule 2-5-1 (adv.) Pre-2020.1
MISRA.CHAR.NOT_CHARACTER 'char' is used for non-character value Rule 5-0-11 (req.) Pre-2020.1
MISRA.CHAR.OPERAND Expression of type 'char' or 'wchar_t' is used as non-character operand Rule 4-5-3 (req.) Pre-2020.1
MISRA.CHAR.TRIGRAPH Trigraph usage Rule 2-3-1 (req.) Pre-2020.1
MISRA.COMMA Comma operator is used Rule 5-18-1 (req.) Pre-2020.1
MISRA.COMP.WRAPAROUND Wrap-around in a condition Rule 5-19-1 (adv.) 2020.3
MISRA.CONST.RET.NON_CONST Constant member function returns non-const pointer to member variable Rule 9-3-1 (req.) Pre-2020.1
MISRA.CONTINUE.ILL Continue statement is used in an ill-formed for loop Rule 6-6-3 (req.) Pre-2020.1
MISRA.CONV.FLOAT Implicit floating-point conversion Rule 5-0-5 (req.) Pre-2020.1
MISRA.CONV.INT.SIGN Implicit integral conversion changes signedness Rule 5-0-4 (req.) Pre-2020.1
MISRA.CONV.NUM.NARROWER Implicit numeric conversion to narrower type Rule 5-0-6 (req.) Pre-2020.1
MISRA.COPY.CSTR.TMPL Class has a template constructor with a single generic parameter, but has no copy constructor defined Rule 14-5-2 (req.) Pre-2020.1
MISRA.COPYASSIGN.ABSTRACT Copy assignment should be declared protected or private in an abstract class Rule 12-8-2 (req.) Pre-2020.1
MISRA.COPYASSIGN.TMPL A copy ssignment operator should be defined when class has a template copy assignment operator with a single generic parameter Rule 14-5-3 (req.) Pre-2020.1
MISRA.CT.UNIQUE.ID Identifier clashes with tag name Rule 2-10-4 (req.) 2021.2
MISRA.CTOR.BASE Constructor does not explicitly call constructor of its base class Rule 12-1-2 (adv.) 2020.2
MISRA.CTOR.DYNAMIC Object's dynamic type is used from the body of its constructor Rule 12-1-1 (req.) Pre-2020.1
MISRA.CTOR.NOT_EXPLICIT Constructor with one argument of built-in type is not declared 'explicit' Rule 12-1-3 (req.) Pre-2020.1
MISRA.CTOR.TRY.NON_STATIC Function try/catch block of constructor or destructor references non-static members Rule 15-3-3 (req.) Pre-2020.1
MISRA.CVALUE.IMPL.CAST.CPP The value of an expression implicitly converted to a different type Rule 5-0-3 (req.) Pre-2020.1
MISRA.C_CAST C-style cast to non-void type Rule 5-2-4 (req.) Pre-2020.1
MISRA.DECL.ARRAY_SIZE Declaration of array with unknown size Rule 3-1-3 (req.) Pre-2020.1
MISRA.DECL.EXCPT.SPEC Function is declared with different exception specifications Rule 15-4-1 (req.) Pre-2020.1
MISRA.DECL.FUNC_LOCAL Function is declared locally Rule 3-1-2 (req.) Pre-2020.1
MISRA.DECL.MANY_DCLS More than one declarator in one declaration Rule 8-0-1 (req.) Pre-2020.1
MISRA.DEFINE.BADEXP.CPP Inappropriate macro expansion in a C++ source Rule 16-2-2 (req.) Pre-2020.1
MISRA.DEFINE.FUNC Function-like macro definition Rule 16-0-4 (req.) Pre-2020.1
MISRA.DEFINE.NOPARS Macro parameter with no parentheses Rule 16-0-6 (req.) 2020.4
MISRA.DEFINE.NOTGLOBAL Define not at the global level Rule 16-0-2 (req.) Pre-2020.1
MISRA.DEFINE.SHARP # or ## operator in a macro definition Rule 16-3-2 (adv.) Pre-2020.1
MISRA.DEFINE.SHARP.MANY Several # or ## operators in a macro definition Rule 16-3-1 (req.) Pre-2020.1
MISRA.DEFINE.WRONGNAME Usage of a name from the standard library for naming a macro Rule 17-0-1 (req.) Pre-2020.1
MISRA.DEFINE.WRONGNAME.UNDERSCORE Usage of a reserved name for naming a macro Rule 17-0-1 (req.) Pre-2020.1
MISRA.DERIVE.VIRTUAL Class is derived from virtual base Rule 10-1-1 (adv.) Pre-2020.1
MISRA.DTOR.DYNAMIC Object's dynamic type is used from the body of its destructor Rule 12-1-1 (req.) Pre-2020.1
MISRA.DTOR.THROW Throw in destructor Rule 15-5-1 (req.) 2024.1
MISRA.ELIF.DEFINED Incorrect 'defined' usage in #elif directive Rule 16-1-1 (req.) Pre-2020.1
MISRA.ELIF.OTHERFILE #elif in an improper file Rule 16-1-2 (req.) Pre-2020.1
MISRA.ELIF.UNDEF Undefined macros in #elif directive Rule 16-0-7 (req.) Pre-2020.1
MISRA.ELIF.WRAPAROUND Wrap-around in #elif directive Rule 5-19-1 (adv.) Pre-2020.1
MISRA.ELSE.OTHERFILE #else in an improper file Rule 16-1-2 (req.) Pre-2020.1
MISRA.ENDIF.OTHERFILE #endif in an improper file Rule 16-1-2 (req.) Pre-2020.1
MISRA.ENUM.INIT Non-first enumerator is explicitly initialized, but not all elements are explicitly initialized. Rule 8-5-3 (req.) Pre-2020.1
MISRA.ENUM.OPERAND Expression of enum type is used in arithmetic context Rule 4-5-2 (req.) Pre-2020.1
MISRA.EXPANSION.DIRECTIVE Directive-like tokens within a macro argument Rule 16-0-5 (req.) Pre-2020.1
MISRA.EXPANSION.UNSAFE Unsafe macro usage Rule 17-0-5 (req.) Rule 18-0-1 (req.) Rule 18-2-1 (req.) Rule 18-7-1 (req.) Rule 19-3-1 (req.) Pre-2020.1
MISRA.EXPR.COND.NOT_BOOLEAN First operand of conditional expression is not a boolean expression Rule 5-0-14 (req.) Pre-2020.1
MISRA.EXPR.PARENS.INSUFFICIENT Limited dependence required for operator precedence rules in expressions Rule 5-0-2 (adv.) Pre-2020.1
MISRA.EXPR.PARENS.REDUNDANT Limited dependence required for operator precedence rules in expressions Rule 5-0-2 (adv.) 2024.1
MISRA.FIELD.BIT.ENUM Bit-field has enum type. Rule 9-6-3 (req.) Pre-2020.1
MISRA.FLOAT.BIT.REPR Use of bit manipulations of floating-point values which rely on storage layout Rule 3-9-3 (req.) Pre-2020.1
MISRA.FLOAT_EQUAL Floating point expression is tested for equality Rule 6-2-2 (req.) 2023.4
MISRA.FOR.COND.CHANGE For loop counter is modified within the loop condition section Rule 6-5-3 (req.) Pre-2020.1
MISRA.FOR.COND.EQ ++ or -- operations are not used to change loop counter, but condition tests loop counter for equality Rule 6-5-2 (req.) Pre-2020.1
MISRA.FOR.COUNTER.FLT For loop counter has a floating point type Rule 6-5-1 (req.) Pre-2020.1
MISRA.FOR.COUNTER.MANY Many counters in a for loop Rule 6-5-1 (req.) Pre-2020.1
MISRA.FOR.INCR For loop counter is modified in an inappropriate way Rule 6-5-4 (req.) Pre-2020.1
MISRA.FOR.LOOP_CONTROL.CHANGE.COND Loop control variable is modified in condition section of a for loop Rule 6-5-5 (req.) Pre-2020.1
MISRA.FOR.LOOP_CONTROL.CHANGE.EXPR Loop control variable is modified in expression section of a for loop Rule 6-5-5 (req.) Pre-2020.1
MISRA.FOR.LOOP_CONTROL.NOT_BOOLEAN Loop control variable is not boolean Rule 6-5-6 (req.) Pre-2020.1
MISRA.FOR.STMT.CHANGE For loop counter is modified within the loop statement Rule 6-5-3 (req.) Pre-2020.1
MISRA.FUNC.ADDR Address of a function is used without & operator Rule 8-4-4 (req.) Pre-2020.1
MISRA.FUNC.ARRAY.PARAMS Function argument with array type decay to a pointer Rule 5-2-12 (req.) Pre-2020.1
MISRA.FUNC.DECL.AFTERUSE Function chosen by overload resolution when instantiating a template is declared after its usage Rule 14-6-2 (req.) 2020.4
MISRA.FUNC.PARAMS.IDENT Identifiers used in declaration and definition of function are not identical Rule 8-4-2 (req.) Pre-2020.1
MISRA.FUNC.RECUR Recursive function Rule 7-5-4 (adv.) Pre-2020.1
MISRA.FUNC.SPEC.NOTSPEC Viable function set for a function call contains both specializations and non-specializations Rule 14-8-2 (adv.) Pre-2020.1
MISRA.FUNC.SPEC.OVRLD Viable function set for a function call contains an overloaded template and its explicit specialization Rule 14-8-1 (req.) Pre-2020.1
MISRA.FUNC.STATIC.REDECL Function or object redeclaration does not include 'static' modifier Rule 3-3-2 (req.) Pre-2020.1
MISRA.FUNC.UNUSEDPAR Formal parameter of a non-virtual function is not used Rule 0-1-11 (req.) Pre-2020.1
MISRA.FUNC.UNUSEDPAR.UNNAMED Unnamed formal parameter of a non-virtual function is not used Rule 0-1-11 (req.) Pre-2020.1
MISRA.FUNC.UNUSEDRET Return value of a non-void function is not used Rule 0-1-7 (req.) Pre-2020.1
MISRA.FUNC.VARARG Function with variable number of arguments Rule 8-4-1 (req.) Pre-2020.1
MISRA.FUNC.VIRTUAL.UNUSEDPAR Formal parameter of a virtual function set is not used Rule 0-1-12 (req.) Pre-2020.1
MISRA.FUNC_CAST Functional notation cast different from explicit constructor call Rule 5-2-4 (req.) 2020.2
MISRA.GENFU.ASSOC Generic function is declared in an associated namespace Rule 14-5-1 (req.) Pre-2020.1
MISRA.GOTO.AFTER.LABEL Unconstrained use of goto Rule 6-6-2 (req.) Pre-2020.1
MISRA.GOTO.NESTED Goto to a label declared in a nested compound statement Rule 6-6-1 (req.) Pre-2020.1
MISRA.IF.DEFINED Incorrect 'defined' usage in #if directive Rule 16-1-1 (req.) Pre-2020.1
MISRA.IF.NO_COMPOUND The body of if/else statement is not a compound statement Rule 6-4-1 (req.) Pre-2020.1
MISRA.IF.NO_ELSE A chain of if/else-if statements is not terminated with else or is terminated with an empty else clause Rule 6-4-2 (req.) Pre-2020.1
MISRA.IF.UNDEF Undefined macros in #if directive Rule 16-0-7 (req.) Pre-2020.1
MISRA.IF.WRAPAROUND Wrap-around in #if directive Rule 5-19-1 (adv.) Pre-2020.1
MISRA.INCGUARD Include guard is not provided Rule 16-2-3 (req.) Pre-2020.1
MISRA.INCL.BAD Non-standard include directive Rule 16-2-6 (req.) 2020.4
MISRA.INCL.INSIDE Include directive preceded by a preprocessor output token Rule 16-0-1 (req.) Pre-2020.1
MISRA.INCL.SYMS Non-standard characters in header file names Rule 16-2-4 (req.) Rule 16-2-5 (adv.) Pre-2020.1
MISRA.INCL.UNSAFE Unsafe header inclusion Rule 18-0-2 (req.) Rule 18-0-4 (req.) Rule 18-7-1 (req.) Rule 27-0-1 (req.) 2022.2
MISRA.INCR_DECR.OTHER Increment or decrement operator is mixed with other operators in expression Rule 5-2-10 (adv.) Pre-2020.1
MISRA.INIT.BRACES Incorrect initializer braces placement. Rule 8-5-2 (req.) 2023.2
MISRA.ITER.ONETERM Iteration statement has more than one break or goto for loop termination. Rule 6-6-4 (req.) Pre-2020.1
MISRA.LINKAGE.EXTERN Object or function declaration with external linkage not in header file Rule 3-3-1 (req.) Pre-2020.1
MISRA.LITERAL.NULL.INT NULL used as an integer value. Rule 4-10-1 (req.) 2020.1
MISRA.LITERAL.NULL.PTR Literal zero used as the null-pointer-constant. Rule 4-10-2 (req.) Pre-2020.1
MISRA.LITERAL.SUFFIX.CASE Literal suffix in lower case. Rule 2-13-4 (req.) Pre-2020.1
MISRA.LITERAL.UNSIGNED.SUFFIX Unsigned integer literal without 'U' suffix Rule 2-13-3 (req.) Pre-2020.1
MISRA.LOGIC.NOT_BOOL Operand of logical operation is not boolean Rule 5-3-1 (req.) 2025.1
MISRA.LOGIC.OPERATOR.NOT_BOOL Operand of non-logical operator is effectively boolean Rule 4-5-1 (req.) 2021.2
MISRA.LOGIC.POSTFIX Operand in a logical 'and' or 'or' expression is not a postfix expression Rule 5-2-1 (req.) Pre-2020.1
MISRA.LOGIC.SIDEEFF Right operand in a logical 'and' or 'or' expression contains side effects Rule 5-14-1 (req.) Pre-2020.1
MISRA.MEMB.NON_CONST Non-const member function does not change any member variables Rule 9-3-3 (req.) 2020.1
MISRA.MEMB.NON_STATIC Non-static member function does not use other non-static members of the same class Rule 9-3-3 (req.) 2022.4
MISRA.MEMB.NOT_PRIVATE Member variable in non-POD class is not private Rule 11-0-1 (req.) Pre-2020.1
MISRA.NAMESPACE.DECL Using-declaration in header file Rule 7-3-6 (req.) Pre-2020.1
MISRA.NAMESPACE.DIR Using-directive in header file Rule 7-3-6 (req.) Pre-2020.1
MISRA.NAMESPACE.UNMD Unnamed namespace in header file Rule 7-3-3 (req.) 2024.1
MISRA.NS.GLOBAL Function, variable or type declaration in global namespace Rule 7-3-1 (req.) Pre-2020.1
MISRA.NS.GLOBAL.USING Using directive or declaration in global namespace Rule 7-3-1 (req.) Pre-2020.1
MISRA.NS.MAIN Non-global function with name 'main' is defined Rule 7-3-2 (req.) Pre-2020.1
MISRA.NS.USING.HEADER Using directive or declaration is used in a header file Rule 7-3-6 (req.) Pre-2020.1
MISRA.NS.USING_DECL Multiple declarations for an identifier in the same namespace should not straddle a using-declaration for that identifier Rule 7-3-5 (req.) Pre-2020.1
MISRA.NS.USING_DIR Using directive Rule 7-3-4 (req.) Pre-2020.1
MISRA.NULL.STMT Null statement is not the only statement on line or comments are placed incorrectly Rule 6-2-3 (req.) Pre-2020.1
MISRA.OBJ.TYPE.COMPAT Type not compatible with type of other declaration Rule 3-2-1 (req.) Pre-2020.1
MISRA.OBJ.TYPE.IDENT Type not identical with type of other declaration Rule 3-9-1 (req.) Pre-2020.1
MISRA.ONEDEFRULE.FUNC Global function definition in a header file Rule 3-1-1 (req.) Pre-2020.1
MISRA.ONEDEFRULE.VAR Global variable definition in a header file Rule 3-1-1 (req.) 2023.4
MISRA.PPARAM.NEEDS.CONST Pointer parameter is not used to modify the addressed object but is not declared as a pointer to const Rule 7-1-2 (req.) Pre-2020.1
MISRA.PRAGMA Non-documented pragma directive Rule 16-6-1 (doc.) Pre-2020.1
MISRA.PRAGMA.ASM Incorrect assembler instruction Rule 7-4-2 (req.) Pre-2020.1
MISRA.PTR.ARITH Pointer is used in arithmetic or array index expression Rule 5-0-15 (req.) 2020.2
MISRA.PTR.ARITH.NOT_SAME.2008 A pointer resulting from arithmetic on a pointer operand shall address an element of the same array as that pointer operand Rule 5-0-16 (req.) 2020.2
MISRA.PTR.CMP.2008 Pointer comparison using comparison operators shall only be applied if pointing to same array and within the range Rule 5-0-18 (req.) 2022.1
MISRA.PTR.CMP.OBJECT.2008 Pointer comparison using comparison operators shall only be applied if pointing to same object and within the range Rule 5-0-18 (req.) 2022.1
MISRA.PTR.SUB Pointer subtraction shall only be applied if pointing to same array Rule 5-0-17 (req.) 2022.4
MISRA.PTR.SUB.OBJECT Pointer subtraction shall only be applied if pointing to same object Rule 5-0-17 (req.) 2022.4
MISRA.PTR.TO_PTR_TO_PTR Pointer declaration has more than two levels of indirection Rule 5-0-19 (req.) Pre-2020.1
MISRA.PUREVIRT.OVRD Pure virtual function overrides a non pure virtual function Rule 10-3-3 (req.) Pre-2020.1
MISRA.RET.REF.NON_CONST Member function returns non-const handle to member variable Rule 9-3-2 (req.) Pre-2020.1
MISRA.RETURN.NOT_LAST Return is not the last statement in a function Rule 6-6-5 (req.) Pre-2020.1
MISRA.SAME.DEFPARAMS Overriding virtual function and the function it overrides have different default arguments Rule 8-3-1 (req.) Pre-2020.1
MISRA.SHIFT.RANGE Right operand of shift operation is out of range - greater or equal to max bit-length of left operand, or negative Rule 5-8-1 (req.) Pre-2020.1
MISRA.SIGNED_CHAR.NOT_NUMERIC 'signed char' or 'unsigned char' is used for non-numeric value Rule 5-0-12 (req.) Pre-2020.1
MISRA.SIZEOF.SIDE_EFFECT Operand of sizeof has side effects Rule 5-3-4 (req.) Pre-2020.1
MISRA.SPEC.ILL Explicit instantiation of a template makes the code ill-formed Rule 14-7-2 (req.) Pre-2020.1
MISRA.SPEC.SAMEFILE Template specialization and its primary template are declared in different files Rule 14-7-3 (req.) Pre-2020.1
MISRA.STDLIB.ABORT Use of 'abort', 'exit', 'getenv' or 'system' from library stdlib.h Rule 18-0-3 (req.) Pre-2020.1
MISRA.STDLIB.ATOI Use of 'atof', 'atoi' or 'atol' from library stdlib.h Rule 18-0-2 (req.) Pre-2020.1
MISRA.STDLIB.CSTRING Function from 'cstring' library is used Rule 18-0-5 (req.) Pre-2020.1
MISRA.STDLIB.CSTRING.MACRO Macro from 'cstring' library is used Rule 18-0-5 (req.) Pre-2020.1
MISRA.STDLIB.ERRNO Use of error indicator 'errno' Rule 19-3-1 (req.) Pre-2020.1
MISRA.STDLIB.LONGJMP Use of setjmp macro or longjmp function Rule 17-0-5 (req.) Pre-2020.1
MISRA.STDLIB.MEMORY Use of dynamic heap memory allocation Rule 18-4-1 (req.) Pre-2020.1
MISRA.STDLIB.SIGNAL Use of the signal handling facilities of signal.h Rule 18-7-1 (req.) Pre-2020.1
MISRA.STDLIB.STDIO Use of input/output library stdio.h in production code Rule 27-0-1 (req.) Pre-2020.1
MISRA.STDLIB.TIME Use of the time handling functions of library time.h Rule 18-0-4 (req.) Pre-2020.1
MISRA.STDLIB.WRONGNAME Reused name of standard library macro, object or function Rule 17-0-3 (req.) Pre-2020.1
MISRA.STDLIB.WRONGNAME.UNDERSCORE Usage of a reserved name for naming a language entity Rule 17-0-3 (req.) Pre-2020.1
MISRA.STMT.COND.NOT_BOOLEAN Condition of if or loop statement is not a boolean expression Rule 5-0-13 (req.) Pre-2020.1
MISRA.STMT.NO_COMPOUND The body of switch, while, do/while or for statement is not a compound statement Rule 6-3-1 (req.) Pre-2020.1
MISRA.STRINGS.CONCAT Narrow and wide string literals concatenated Rule 2-13-5 (req.) Pre-2020.1
MISRA.SWITCH.BOOL Condition of switch statement is boolean expression Rule 6-4-7 (req.) Pre-2020.1
MISRA.SWITCH.LABEL A switch label belongs to nested compound statement inside switch body Rule 6-4-4 (req.) Pre-2020.1
MISRA.SWITCH.NODEFAULT No default clause at the end of a switch statement Rule 6-4-6 (req.) Pre-2020.1
MISRA.SWITCH.NOT_WELL_FORMED Switch statement is not well-formed Rule 6-4-3 (req.) Pre-2020.1
MISRA.SWITCH.NO_BREAK No break or throw statement at the end of switch-clause Rule 6-4-5 (req.) Pre-2020.1
MISRA.SWITCH.NO_CASE No case-clause in a switch statement Rule 6-4-8 (req.) Pre-2020.1
MISRA.TEMPLMEM.NOQUAL In an instantiated template a member declared in a dependant base is used without a qualificator or 'this' Rule 14-6-1 (req.) Pre-2020.1
MISRA.TERMINATE terminate() function is called explicitly Rule 15-5-3 (req.) Pre-2020.1
MISRA.THROW.EMPTY Empty throw expression does not belong to a catch block Rule 15-1-3 (req.) Pre-2020.1
MISRA.THROW.NULL NULL is thrown explicitly Rule 15-1-2 (req.) Pre-2020.1
MISRA.THROW.PTR Exception object is a pointer Rule 15-0-2 (adv.) Pre-2020.1
MISRA.TOKEN.BADCOM Inappropriate character sequence in a comment Rule 2-7-1 (req.) Pre-2020.1
MISRA.TOKEN.COMMENTED.CODE Comment appears to contain commented out source code Rule 2-7-2 (req.) Rule 2-7-3 (adv.) 2024.3
MISRA.TOKEN.OCTAL.ESCAPE Usage of octal escape sequences Rule 2-13-2 (req.) Pre-2020.1
MISRA.TOKEN.OCTAL.INT Usage of octal integer constants Rule 2-13-2 (req.) 2020.4
MISRA.TOKEN.WRONGESC.CPP.2008 Incorrect escape sequence in a literal Rule 2-13-1 (req.) 2024.2
MISRA.TRY.JUMP Control can be transferred into a try block with goto or switch statement Rule 15-0-3 (req.) Pre-2020.1
MISRA.TYPE.NAMECLASH.CPP.2008 Identifier in one name space has same spelling as identifier in other name space Rule 2-10-6 (req.) 2020.2
MISRA.TYPEDEF.NOT_UNIQUE Typedef name is used for another entity Rule 2-10-3 (req.) Pre-2020.1
MISRA.UMINUS.UNSIGNED Operand of unary minus is unsigned Rule 5-3-2 (req.) 2021.2
MISRA.UNDEF Undef usage Rule 16-0-3 (req.) Pre-2020.1
MISRA.UNDEF.NOTGLOBAL Undef not at the global level Rule 16-0-2 (req.) Pre-2020.1
MISRA.UNDEF.WRONGNAME Undefinition of a name from the standard library Rule 17-0-2 (req.) Pre-2020.1
MISRA.UNDEF.WRONGNAME.UNDERSCORE Undefinition of a reserved name Rule 17-0-2 (req.) Pre-2020.1
MISRA.UNION Union is used Rule 9-5-1 (req.) Pre-2020.1
MISRA.UN_OP.OVERLOAD Unary & operator is overloaded Rule 5-3-3 (req.) Pre-2020.1
MISRA.USE.DEFINE Non-guarding macro definition Rule 16-2-1 (req.) 2020.4
MISRA.USE.EXPANSION Macro expansion Rule 16-2-1 (req.) 2022.1
MISRA.USE.UNKNOWNDIR Unknown preprocessor directive is used Rule 16-0-8 (req.) Pre-2020.1
MISRA.USE.WRONGDIR Improper preprocessor directive Rule 16-2-1 (req.) Pre-2020.1
MISRA.VAR.HIDDEN Identifier declared in an inner scope hides identifier in outer scope Rule 2-10-2 (req.) 2020.2
MISRA.VAR.MIN.VIS Name visibility is too wide Rule 3-4-1 (req.) 2020.1
MISRA.VAR.NEEDS.CONST Variable is not modified but is declared without const qualifier Rule 7-1-1 (req.) 2020.1
MISRA.VAR.UNIQUE.STATIC Identifier with static storage specifier clashes with other identifier Rule 2-10-5 (adv.) Pre-2020.1
MISRA.VIRTUAL.BASE.DIAMOND Base class is used as virtual not in diamond hierarchy Rule 10-1-2 (req.) Pre-2020.1
MISRA.VIRTUAL.NOVIRTUAL Overriding virtual function declared with no 'virtual' keyword Rule 10-3-2 (req.) Pre-2020.1
NUM.OVERFLOW.DF Possible numeric overflow or wraparound Rule 5-19-1 (adv.) 2024.2
PORTING.VAR.EFFECTS Variable used twice in one expression where one usage is subject to side-effects Rule 5-0-1 (req.) Pre-2020.1
UNINIT.CTOR.MIGHT Uninitialized Variable in Constructor - possible Rule 8-5-1 (req.) Pre-2020.1
UNINIT.CTOR.MUST Uninitialized Variable in Constructor Rule 8-5-1 (req.) 2020.1
UNINIT.HEAP.MIGHT Uninitialized Heap Use - possible Rule 8-5-1 (req.) Pre-2020.1
UNINIT.HEAP.MUST Uninitialized Heap Use Rule 8-5-1 (req.) Pre-2020.1
UNINIT.STACK.ARRAY.MIGHT Uninitialized Array - possible Rule 8-5-1 (req.) Pre-2020.1
UNINIT.STACK.ARRAY.MUST Uninitialized Array Rule 8-5-1 (req.) Pre-2020.1
UNINIT.STACK.ARRAY.PARTIAL.MUST Partially Uninitialized Array Rule 8-5-1 (req.) Pre-2020.1
UNINIT.STACK.MIGHT Uninitialized Variable - possible Rule 8-5-1 (req.) Pre-2020.1
UNINIT.STACK.MUST Uninitialized Variable Rule 8-5-1 (req.) Pre-2020.1
UNREACH.ENUM Code is unreachable due to the possible value(s) of an enum Rule 0-1-1 (req.) 2021.3
UNREACH.GEN Unreachable code Rule 0-1-1 (req.) Pre-2020.1
UNREACH.RETURN Unreachable Void Return Rule 0-1-1 (req.) Pre-2020.1
UNUSED.FUNC.GEN Function defined but not used Rule 0-1-10 (req.) 2023.4
VA_UNUSED.GEN Value is Never Used after Assignment Rule 0-1-9 (req.) Pre-2020.1
VA_UNUSED.INIT Value is Never Used after Initialization Rule 0-1-9 (req.) Pre-2020.1

"MISRA", "MISRA C" and "MISRA C++" are registered trademarks of The MISRA Consortium Limited. ​