AUTOSAR 18-10 Standard mapped to Klocwork and community C and C++ checkers - Strict
You can use the AUTOSAR C++14 Strict taxonomy to ensure compliance with the AUTOSAR C++14 Standard, release 18-10. The AUTOSAR C++14 (18-10) taxonomy detects violations of our both our Klocwork C/C++ checkers, our MISRA checkers, and our Klocwork community checkers. This taxonomy includes coverage for additional rules compared to the non-strict version.
Rule | Checker name and description |
---|---|
A0-1-2 (req.) |
MISRA.FUNC.UNUSEDRET Return value of a non-void function is not used |
A0-1-4 (req.) |
MISRA.FUNC.UNUSEDPAR Formal parameter of a non-virtual function is not used |
A0-1-5 (req.) |
MISRA.FUNC.VIRTUAL.UNUSEDPAR Formal parameter of a virtual function set is not used |
A0-4-2 (req.) |
AUTOSAR.TYPE.LONG_DOUBLE Type long double shall not be used |
A2-5-1 (req.) |
MISRA.CHAR.TRIGRAPH Trigraph usage |
A2-5-2 (req.) |
MISRA.CHAR.DIGRAPH Digraph usage |
A2-10-1 (req.) |
MISRA.VAR.HIDDEN Identifier declared in an inner scope hides identifier in outer scope |
A2-10-5 (adv.) |
MISRA.VAR.UNIQUE.STATIC Identifier with static storage specifier clashes with other identifier |
A2-10-6 (req.) |
MISRA.TYPE.NAMECLASH.CPP.2008 Identifier in one name space has same spelling as identifier in other name space |
A2-11-1 (req.) |
AUTOSAR.TYPE.QUAL.VOLATILE The volatile type qualifier shall not be used |
A2-13-1 (req.) |
MISRA.TOKEN.WRONGESC.CPP.2008 Incorrect escape sequence in a literal |
A2-13-2 (req.) |
MISRA.STRINGS.CONCAT Narrow and wide string literals concatenated |
A2-13-3 (req.) |
AUTOSAR.TYPE.WCHAR_T Type wchar_t shall not be used |
A2-13-4 (req.) |
AUTOSAR.ADD.STR.TO.NON.CONST String literals shall not be assigned to non-constant pointers |
A2-13-5 (adv.) |
AUTOSAR.HEX.UPPER Hexadecimal constants should be upper case |
A3-1-1 (req.) |
AUTOSAR.ADD.ONEDEFRULE.FUNC Function is violating one definition rule AUTOSAR.ADD.ONEDEFRULE.VAR Variable is violating one definition rule MISRA.ONEDEFRULE.FUNC Global function definition in a header file MISRA.ONEDEFRULE.VAR Global variable definition in a header file |
A3-1-3 (adv.) |
AUTOSAR.ADD.FILE.EXT Local implementation files not having .cpp file extension |
A3-1-4 (req.) |
MISRA.DECL.ARRAY_SIZE Declaration of array with unknown size |
A3-1-5 (req.) |
AUTOSAR.FUNC.INLINE_DEF A function definition shall only be placed in a class definition if (1) the function is intended to be inlined (2); it is a member function template; (3) it is a member function of a class template |
A3-3-1 (req.) |
MISRA.LINKAGE.EXTERN Object or function declaration with external linkage not in header file |
A3-9-1 (req.) |
AUTOSAR.BUILTIN_NUMERIC Fixed width integer types from <cstdint> shall be used in place of the basic numerical types |
A4-5-1 (req.) |
AUTOSAR.ADD.ENUM.OP Enum shall not be used in arithmetic context MISRA.ENUM.OPERAND Expression of enum type is used in arithmetic context |
A4-7-1 (req.) |
NUM.OVERFLOW Possible Overflow NUM.OVERFLOW.DF Possible numeric overflow or wraparound PRECISION.LOSS Loss of Precision |
A4-10-1 (req.) |
AUTOSAR.ADD.NULLPTR Only nullptr literal shall be used as the null-pointer-constant |
A5-0-1 (req.) |
AUTOSAR.ADD.EXPR.EVAL.MULTI.CALL The value of an expression shall be the same under any order of evaluation that the standard permits AUTOSAR.ADD.EXPR.EVAL.VOLATILE The value of an expression shall be the same under any order of evaluation that the standard permits PORTING.VAR.EFFECTS Variable used twice in one expression where one usage is subject to side-effects |
A5-0-2 (req.) |
AUTOSAR.ADD.COND.NOT.BOOL The condition of an if-statement and iteration statement shall have type bool AUTOSAR.ADD.LOGIC.NOT_BOOL The condition of an if-statement and iteration statement shall have type bool MISRA.STMT.COND.NOT_BOOLEAN Condition of if or loop statement is not a boolean expression |
A5-0-3 (req.) |
MISRA.PTR.TO_PTR_TO_PTR Pointer declaration has more than two levels of indirection |
A5-1-1 (req.) |
AUTOSAR.ADD.LITERAL Literal values shall not be used apart from type initialization |
A5-1-2 (req.) |
AUTOSAR.LAMBDA.IMPLICIT_CAPTURE Variables shall not be implicitly captured in a lambda expression |
A5-1-3 (req.) |
AUTOSAR.LAMBDA.NO_PARAM_LIST Parameter list (possibly empty) shall be included in every lambda expression |
A5-1-4 (req.) |
AUTOSAR.LAMBDA.REF_LIFETIME A lambda expression object shall not outlive any of its reference-captured objects |
A5-1-6 (adv.) |
AUTOSAR.LAMBDA.IMPLICIT_RETURN_TYPE Return type of a non-void return type lambda expression should be explicitly specified |
A5-1-7 (req.) |
AUTOSAR.LAMBDA.TYPE_OPERAND A lambda shall not be an operand to decltype or typeid |
A5-1-8 (adv.) |
AUTOSAR.LAMBDA.NESTED Lambda expressions should not be defined inside another lambda expression |
A5-2-1 (adv.) |
AUTOSAR.CAST.DYNAMIC dynamic_cast should not be used |
A5-2-2 (req.) |
AUTOSAR.CAST.CSTYLE Traditional C-style casts shall not be used |
A5-2-3 (req.) |
MISRA.CAST.CONST Cast operation removes const or volatile modifier from a pointer or reference |
A5-2-4 (req.) |
AUTOSAR.CAST.REINTERPRET reinterpret_cast shall not be used |
A5-2-5 (req.) |
ABV.ANY_SIZE_ARRAY Buffer Overflow - Array Index Out of Bounds ABV.GENERAL Buffer Overflow - Array Index Out of Bounds ABV.GENERAL.MULTIDIMENSION Buffer Overflow - Array Index Out of Bounds ABV.ITERATOR Buffer Overflow - Array Index may be out of Bounds ABV.MEMBER Buffer Overflow - Array Index Out of Bounds ABV.STACK Buffer Overflow - Local Array Index Out of Bounds ABV.TAINTED Buffer Overflow from Unvalidated Input ABV.UNICODE.BOUND_MAP Buffer overflow in mapping character function ABV.UNICODE.FAILED_MAP Mapping function failed ABV.UNICODE.NNTS_MAP Buffer overflow in mapping character function ABV.UNICODE.SELF_MAP Mapping function failed ABV.UNKNOWN_SIZE Buffer Overflow - Array Index Out of Bounds |
A5-2-6 (req.) |
MISRA.LOGIC.POSTFIX Operand in a logical 'and' or 'or' expression is not a postfix expression |
A5-3-2 (req.) |
NPD.CHECK.CALL.MIGHT Pointer may be passed to function that can dereference it after it was positively checked for NULL NPD.CHECK.CALL.MUST Pointer will be passed to function that may dereference it after it was positively checked for NULL NPD.CHECK.MIGHT Pointer may be dereferenced after it was positively checked for NULL NPD.CHECK.MUST Pointer will be dereferenced after it was positively checked for NULL NPD.CONST.CALL NULL is passed to function that can dereference it NPD.CONST.DEREF NULL is dereferenced NPD.FUNC.CALL.MIGHT Result of function that may return NULL may be passed to another function that may dereference it NPD.FUNC.CALL.MUST Result of function that may return NULL will be passed to another function that may dereference it NPD.FUNC.MIGHT Result of function that can return NULL may be dereferenced NPD.FUNC.MUST Result of function that may return NULL will be dereferenced NPD.GEN.CALL.MIGHT Null pointer may be passed to function that may dereference it NPD.GEN.CALL.MUST Null pointer will be passed to function that may dereference it NPD.GEN.MIGHT Null pointer may be dereferenced NPD.GEN.MUST Null pointer will be dereferenced |
A5-6-1 (req.) |
DBZ.CONST Division by a zero constant occurs DBZ.CONST.CALL The value '0' is passed to function that can use this value as divisor DBZ.GENERAL Division by zero might occur DBZ.ITERATOR Division by zero might occur in a loop iterator DBZ.ITERATOR.CALL Division by zero might occur in a function call |
A5-10-1 (req.) |
AUTOSAR.VIRTUAL.PTR_COMPARE A pointer to member virtual function shall only be tested for equality with null-pointer-constant |
A5-16-1 (req.) |
AUTOSAR.TERNARY.NESTED The ternary conditional operator shall not be used as a sub-expression |
A6-2-1 (req.) |
AUTOSAR.ADD.ASSIGN.OP.SIDE.EFFECT Move and copy assignment operators shall either move or respectively copy base classes and data members of a class, without any side effects |
A6-4-1 (req.) |
AUTOSAR.SWITCH.CASECOUNT A switch statement shall have at least two case-clauses, distinct from the default label |
A6-5-2 (req.) |
MISRA.FOR.COUNTER.FLT For loop counter has a floating point type MISRA.FOR.COUNTER.MANY Many counters in a for loop |
A6-5-3 (adv.) |
AUTOSAR.DO Do statements should not be used |
A6-5-4 (adv.) |
MISRA.FOR.COUNTER.MANY Many counters in a for loop |
A6-6-1 (req.) |
AUTOSAR.GOTO The goto statement shall not be used |
A7-1-1 (req.) |
MISRA.VAR.NEEDS.CONST Variable is not modified but is declared without const qualifier |
A7-1-3 (req.) |
AUTOSAR.TYPEDEF.CVQ_EAST CV-qualifiers shall be placed on the right hand side of the type that is a typedef or a using name |
A7-1-4 (req.) |
AUTOSAR.REGISTER The register keyword shall not be used |
A7-1-5 (req.) |
AUTOSAR.ADD.AUTO.SPECIFIER The auto specifier shall not be used here |
A7-1-6 (req.) |
AUTOSAR.TYPEDEF The typedef specifier shall not be used |
A7-1-7 (req.) |
AUTOSAR.STYLE.SINGLE_DECL_PER_LINE Each expression statement and identifier declaration shall be placed on a separate line AUTOSAR.STYLE.SINGLE_STMT_PER_LINE Each expression statement and identifier declaration shall be placed on a separate line |
A7-1-8 (req.) |
AUTOSAR.DECL.NONTYPE_SPECIFIER A non-type specifier shall be placed before a type specifier in a declaration |
A7-1-9 (req.) |
AUTOSAR.DECL.IN_DEFN A class, structure, or enumeration shall not be declared in the definition of its type |
A7-2-2 (req.) |
AUTOSAR.ENUM.EXPLICIT_BASE_TYPE Enumeration underlying base type shall be explicitly defined |
A7-2-3 (req.) |
AUTOSAR.ENUM.UNSCOPED Enumerations shall be declared as scoped enum classes |
A7-2-4 (req.) |
MISRA.ENUM.INIT Non-first enumerator is explicitly initialized, but not all elements are explicitly initialized. |
A7-3-1 (req.) |
MISRA.NS.USING_DECL Multiple declarations for an identifier in the same namespace should not straddle a using-declaration for that identifier |
A7-4-1 (req.) |
AUTOSAR.ASM The asm declaration shall not be used |
A7-5-1 (req.) |
AUTOSAR.ADD.RTN.REF.CONST.PARAM A function shall not return a reference or a pointer to a parameter that is passed by reference to const |
A7-5-2 (req.) |
MISRA.FUNC.RECUR Recursive function |
A8-2-1 (req.) |
AUTOSAR.ADD.FUNC.TEMPLATE.TRAIL.RTN In function templates, the trailing return type syntax shall be used if the return type depends on the type of parameters |
A8-4-1 (req.) |
MISRA.FUNC.VARARG Function with variable number of arguments |
A8-4-2 (req.) |
FUNCRET.GEN Non-void function does not return value |
A8-5-0 (req.) |
UNINIT.CTOR.MIGHT Uninitialized Variable in Constructor - possible UNINIT.CTOR.MUST Uninitialized Variable in Constructor UNINIT.HEAP.MIGHT Uninitialized Heap Use - possible UNINIT.HEAP.MUST Uninitialized Heap Use UNINIT.STACK.ARRAY.MIGHT Uninitialized Array - possible UNINIT.STACK.ARRAY.MUST Uninitialized Array UNINIT.STACK.ARRAY.PARTIAL.MUST Partially Uninitialized Array UNINIT.STACK.MIGHT Uninitialized Variable - possible UNINIT.STACK.MUST Uninitialized Variable |
A8-5-1 (req.) |
CWARN.MEMBER.INIT.ORDER Members of the initialization list are not listed in the order in which they are declared in the class |
A8-5-3 (req.) |
AUTOSAR.ADD.AUTO.INIT.FORMAT A variable of type auto shall not be initialized using {} or ={} braced-initialization. |
A8-5-4 (adv.) |
AUTOSAR.ADD.CTOR.INIT.LIST If a class has a user-declared constructor that takes a parameter of type std::initializer_list, then it shall be the only constructor apart from special member function constructors |
A9-3-1 (req.) |
MISRA.RET.REF.NON_CONST Member function returns non-const handle to member variable |
A9-5-1 (req.) |
AUTOSAR.UNION Unions shall not be used |
A10-2-1 (req.) |
AUTOSAR.ADD.REDEF.DERIVED.FUNC Non-virtual public or protected member functions shall not be redefined in derived classes. |
A10-3-1 (req.) |
AUTOSAR.MEMB.VIRTUAL.SPEC Virtual function declaration shall contain exactly one of the three specifiers: (1) virtual, (2) override, (3) final. |
A10-3-2 (req.) |
AUTOSAR.ADD.OVERRIDE.VIRTUAL.SPECIFIER Each overriding virtual function shall be declared with the override or final specifier |
A10-3-3 (req.) |
AUTOSAR.MEMB.VIRTUAL.FINAL Virtual functions shall not be introduced in a final class |
A10-3-5 (req.) |
AUTOSAR.ADD.ASSIGN.OP.VIRTUAL A user-defined assignment operator shall not be virtual |
A11-3-1 (req.) |
AUTOSAR.FRIEND_DECL Friend declarations shall not be used |
A12-1-1 (req.) |
MISRA.CTOR.BASE Constructor does not explicitly call constructor of its base class |
A12-1-2 (req.) |
AUTOSAR.CTOR.NSDMI_INIT_LIST Both NSDMI and a non-static member initializer in a constructor shall not be used in the same type |
A12-1-4 (req.) |
AUTOSAR.CTOR.NO_EXPLICIT All constructors that are callable with a single argument of fundamental type shall be declared explicit |
A12-4-1 (req.) |
CL.MLK.VIRTUAL Memory Leak - possible in destructor |
A12-4-2 (adv.) |
AUTOSAR.DTOR.NON_VIRTUAL If a public destructor of a class is non-virtual, then the class should be declared final |
A12-6-1 (req.) |
AUTOSAR.ADD.CTOR.MEMBER.INIT All class data members that are initialized by the constructor shall be initialized using member initializers |
A12-8-4 (req.) |
AUTOSAR.CTOR.MOVE.COPY_SEMANTICS Move constructor shall not initialize its class members and base classes using copy semantics |
A12-8-5 (req.) |
CL.SELF-ASSIGN Use of free memory (double free) - in operator= |
A12-8-7 (adv.) |
AUTOSAR.ASSIGN.REF_QUAL Assignment operators should be declared with the ref-qualifier & |
A13-1-2 (req.) |
AUTOSAR.OP.LITERAL.SUFFIX User defined suffixes of the user defined literal operators shall start with underscore followed by one or more letters |
A13-2-1 (req.) |
AUTOSAR.ASSIGN.RETURN An assignment operator shall return a reference to "this" |
A13-2-2 (req.) |
AUTOSAR.OP.BINARY.RETVAL A binary arithmetic operator and a bitwise operator shall return a "prvalue" |
A13-2-3 (req.) |
AUTOSAR.OP.RELATIONAL.RETVAL A relational operator shall return a boolean value |
A13-5-1 (req.) |
AUTOSAR.OP.INDEX.NON_CONST If "operator[]" is to be overloaded with a non-const version, const version shall also be implemented |
A13-5-2 (req.) |
AUTOSAR.OP.CONV.NON_EXPLICIT All user-defined conversion operators shall be defined explicit |
A13-5-3 (adv.) |
AUTOSAR.OP.CONV User-defined conversion operators should not be used |
A13-5-5 (req.) |
AUTOSAR.OP.COMPARE.MEMBER Comparison operators shall be non-member functions AUTOSAR.OP.COMPARE.NON_NOEXCEPT Comparison operators shall be noexcept AUTOSAR.OP.COMPARE.PARAMS Comparison operators shall have identical parameter types |
A13-6-1 (req.) |
AUTOSAR.DIGIT_SEPARATORS Digit sequences separators ' shall only be used as follows (1) for decimal, every 3 digits, (2) for hexadecimal, every 2 digits, (3) for binary, every 4 digits |
A14-5-1 (req.) |
MISRA.COPY.CSTR.TMPL Class has a template constructor with a single generic parameter, but has no copy constructor defined |
A14-5-3 (adv.) |
AUTOSAR.OP.TMPL.NON_MEMBER A non-member generic operator shall only be declared in a namespace that does not contain class (struct) type, enum type or union type declarations |
A14-7-2 (req.) |
MISRA.SPEC.SAMEFILE Template specialization and its primary template are declared in different files |
A14-8-2 (req.) |
AUTOSAR.FUNC.TMPL.EXPLICIT_SPEC Explicit specializations of function templates shall not be used |
A15-1-2 (req.) |
MISRA.THROW.PTR Exception object is a pointer |
A15-1-4 (req.) |
MLK.MIGHT Memory Leak - possible MLK.MUST Memory Leak MLK.RET.MIGHT Memory Leak - possible MLK.RET.MUST Memory Leak |
A15-2-2 (req.) |
CL.MLK Memory Leak - in destructor |
A15-3-3 (req.) |
MISRA.CATCH.ALL No ellipsis exception handler in a try-catch block |
A15-3-5 (req.) |
MISRA.CATCH.BY_VALUE Exception object of class type is caught by value |
A15-4-1 (req.) |
AUTOSAR.EXCPT.DYNAMIC_SPEC Dynamic exception-specification shall not be used |
A15-4-2 (req.) |
AUTOSAR.EXCPT.NOEXCPT_THROW If a function is declared to be noexcept, noexcept(true) or noexcept(<true condition>), then it shall not exit with an exception |
A15-5-1 (req.) |
AUTOSAR.EXCPT.SPECIAL_MEMBER_THROW All user-provided class destructors, deallocation functions, move constructors, move assignment operators and swap functions shall not exit with an exception |
A15-5-2 (req.) |
MISRA.STDLIB.ABORT Use of 'abort', 'exit', 'getenv' or 'system' from library stdlib.h |
A16-0-1 (req.) |
MISRA.USE.DEFINE Non-guarding macro definition |
A16-2-1 (req.) |
MISRA.INCL.SYMS Non-standard characters in header file names |
A16-7-1 (req.) |
MISRA.PRAGMA Non-documented pragma directive |
A17-0-1 (req.) |
MISRA.DEFINE.WRONGNAME Usage of a name from the standard library for naming a macro MISRA.DEFINE.WRONGNAME.UNDERSCORE Usage of a reserved name for naming a macro |
A18-0-1 (req.) |
MISRA.EXPANSION.UNSAFE Unsafe macro usage |
A18-0-2 (req.) |
MISRA.STDLIB.ATOI Use of 'atof', 'atoi' or 'atol' from library stdlib.h |
A18-0-3 (req.) |
AUTOSAR.SETLOCALE The library <clocale> (locale.h) and the setlocale function shall not be used |
A18-1-1 (req.) |
AUTOSAR.ARRAY.CSTYLE C-style arrays shall not be used |
A18-1-2 (req.) |
AUTOSAR.VECTOR.BOOL The std::vector<bool> specialization shall not be used |
A18-1-3 (req.) |
AUTOSAR.AUTO_PTR The std::auto_ptr type shall not be used |
A18-5-1 (req.) |
AUTOSAR.STDLIB.MEMORY Functions malloc, calloc, realloc and free shall not be used |
A18-5-2 (req.) |
AUTOSAR.OP.NEW_DELETE Non-placement new or delete expressions shall not be used |
A18-5-3 (req.) |
FMM.MIGHT Freeing Mismatched Memory - possible FMM.MUST Freeing Mismatched Memory |
A18-5-4 (req.) |
AUTOSAR.OP.DELETE.MISSING_VERSION If a project has sized or unsized version of operator "delete" globally defined, then both sized and unsized versions shall be defined |
A18-5-11 (req.) |
AUTOSAR.OP.NEW_NO_DELETE "operator new" and "operator delete" shall be defined together |
A18-9-1 (req.) |
AUTOSAR.STDLIB.BIND The std::bind shall not be used |
A18-9-2 (req.) |
AUTOSAR.FORWARD Forwarding values to other functions shall be done via: (1) std::move if the value is an rvalue reference, (2) std::forward if the value is forwarding reference |
A18-9-3 (req.) |
AUTOSAR.STDLIB.MOVE.CONST The std::move shall not be used on objects declared const or const& |
A21-8-1 (req.) |
AUTOSAR.STDLIB.CCTYPE.UCHAR Arguments to character-handling functions defined in <cctype> shall be representable as an unsigned char |
A26-5-1 (req.) |
AUTOSAR.STDLIB.RAND Pseudorandom numbers shall not be generated using std::rand() AUTOSAR.STDLIB.RANDOM_SHUFFLE Pseudorandom numbers shall not be generated using std::rand() |
A26-5-2 (req.) |
AUTOSAR.STDLIB.RANDOM.NBR_GEN_DEFAULT_INIT Random number engines shall not be default-initialized |
A27-0-2 (adv.) |
NNTS.MIGHT Buffer Overflow - Non-null Terminated String NNTS.MUST Buffer Overflow - Non-null Terminated String NNTS.TAINTED Unvalidated User Input Causing Buffer Overflow - Non-Null Terminated String SV.UNBOUND_STRING_INPUT.CIN Usage of cin for unbounded string input SV.UNBOUND_STRING_INPUT.FUNC Usage of unbounded string input |
A27-0-4 (req.) |
SV.BANNED.RECOMMENDED.ALLOCA Banned recommended API: stack allocation functions SV.BANNED.RECOMMENDED.NUMERIC Banned recommended API: unsafe numeric conversion functions SV.BANNED.RECOMMENDED.OEM Banned recommended API: OEM character page conversion functions SV.BANNED.RECOMMENDED.PATH Banned recommended API: unsafe path name manipulation functions SV.BANNED.RECOMMENDED.SCANF Banned recommended API: unsafe scanf-type functions SV.BANNED.RECOMMENDED.SPRINTF Banned recommended API: unsafe sprintf-type functions SV.BANNED.RECOMMENDED.STRLEN Banned recommended API: unsafe string length functions SV.BANNED.RECOMMENDED.TOKEN Banned recommended API: unsafe string tokenizing functions SV.BANNED.RECOMMENDED.WINDOW Banned recommended API: unsafe window functions |
M0-1-1 (req.) |
UNREACH.ENUM Code is unreachable due to the possible value(s) of an enum UNREACH.GEN Unreachable code UNREACH.RETURN Unreachable Void Return |
M0-1-2 (req.) |
CWARN.NOEFFECT.UCMP.GE Comparison of unsigned value against 0 is always true CWARN.NOEFFECT.UCMP.GE.MACRO Comparison of unsigned value against 0 within a macro is always true CWARN.NOEFFECT.UCMP.LT Comparison of unsigned value against 0 is always false CWARN.NOEFFECT.UCMP.LT.MACRO Comparison of unsigned value against 0 within a macro is always false |
M0-1-3 (req.) |
LV_UNUSED.GEN Local variable unused |
M0-1-9 (req.) |
VA_UNUSED.GEN Value is Never Used after Assignment VA_UNUSED.INIT Value is Never Used after Initialization |
M0-1-10 (adv.) |
UNUSED.FUNC.GEN Function defined but not used |
M0-2-1 (req.) |
MISRA.ASSIGN.OVERLAP Object is assigned to an overlapping object |
M2-7-1 (req.) |
MISRA.TOKEN.BADCOM Inappropriate character sequence in a comment |
M2-13-2 (req.) |
MISRA.TOKEN.OCTAL.ESCAPE Usage of octal escape sequences MISRA.TOKEN.OCTAL.INT Usage of octal integer constants |
M2-13-3 (req.) |
MISRA.LITERAL.UNSIGNED.SUFFIX Unsigned integer literal without 'U' suffix |
M2-13-4 (req.) |
MISRA.LITERAL.SUFFIX.CASE Literal suffix in lower case. |
M3-1-2 (req.) |
MISRA.DECL.FUNC_LOCAL Function is declared locally |
M3-2-1 (req.) |
MISRA.OBJ.TYPE.COMPAT Type not compatible with type of other declaration |
M3-3-2 (req.) |
MISRA.FUNC.STATIC.REDECL Function or object redeclaration does not include 'static' modifier |
M3-4-1 (req.) |
MISRA.VAR.MIN.VIS Name visibility is too wide |
M3-9-1 (req.) |
MISRA.OBJ.TYPE.IDENT Type not identical with type of other declaration |
M3-9-3 (req.) |
MISRA.FLOAT.BIT.REPR Use of bit manipulations of floating-point values which rely on storage layout |
M4-5-1 (req.) |
MISRA.LOGIC.OPERATOR.NOT_BOOL Operand of non-logical operator is effectively boolean |
M4-5-3 (req.) |
MISRA.CHAR.OPERAND Expression of type 'char' or 'wchar_t' is used as non-character operand |
M4-10-1 (req.) |
MISRA.LITERAL.NULL.INT NULL used as an integer value. |
M4-10-2 (req.) |
MISRA.LITERAL.NULL.PTR Literal zero used as the null-pointer-constant. |
M5-0-2 (adv.) |
MISRA.EXPR.PARENS.INSUFFICIENT Limited dependence required for operator precedence rules in expressions MISRA.EXPR.PARENS.REDUNDANT Limited dependence required for operator precedence rules in expressions |
M5-0-3 (req.) |
MISRA.CVALUE.IMPL.CAST.CPP The value of an expression implicitly converted to a different type |
M5-0-4 (req.) |
MISRA.CONV.INT.SIGN Implicit integral conversion changes signedness |
M5-0-5 (req.) |
MISRA.CONV.FLOAT Implicit floating-point conversion |
M5-0-6 (req.) |
MISRA.CONV.NUM.NARROWER Implicit numeric conversion to narrower type |
M5-0-7 (req.) |
MISRA.CAST.FLOAT_INT Cast of floating point expression to integral type MISRA.CAST.INT_FLOAT Cast of integral expression to floating point type |
M5-0-8 (req.) |
MISRA.CAST.FLOAT.WIDER Cast of floating point expression to a wider floating point type MISRA.CAST.INT.WIDER Cast of integral expression to a wider integral type |
M5-0-9 (req.) |
MISRA.CAST.INT.SIGN Non-trivial integral expression is cast to type with different signedness |
M5-0-10 (req.) |
MISRA.CAST.UNSIGNED_BITS The result of bitwise operation on unsigned char or short is not cast back to original type |
M5-0-11 (req.) |
MISRA.CHAR.NOT_CHARACTER 'char' is used for non-character value |
M5-0-12 (req.) |
MISRA.SIGNED_CHAR.NOT_NUMERIC 'signed char' or 'unsigned char' is used for non-numeric value |
M5-0-14 (req.) |
MISRA.EXPR.COND.NOT_BOOLEAN First operand of conditional expression is not a boolean expression |
M5-0-15 (req.) |
MISRA.PTR.ARITH Pointer is used in arithmetic or array index expression |
M5-0-16 (req.) |
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 |
M5-0-20 (req.) |
MISRA.BITS.OPERAND Operands of bitwise operation have different underlying types |
M5-0-21 (req.) |
MISRA.BITS.NOT_UNSIGNED Operand of bitwise operation is not unsigned integer MISRA.BITS.NOT_UNSIGNED.PREP Operand of bitwise operation is not unsigned integer |
M5-2-2 (req.) |
MISRA.CAST.PTR.VRCLASS A cast form pointer to a virtual base class to pointer to a derived class does not use 'dynamic_cast' |
M5-2-3 (adv.) |
MISRA.CAST.POLY.TYPE Cast from a polymorphic base class to a derived class |
M5-2-6 (req.) |
MISRA.CAST.FUNC_PTR.CPP Cast converts function pointer to other pointer type |
M5-2-8 (req.) |
MISRA.CAST.INT_TO_PTR Object with integer type or pointer to void cast to pointer type |
M5-2-9 (req.) |
MISRA.CAST.PTR_TO_INT Cast between a pointer and an integral type |
M5-2-10 (req.) |
MISRA.INCR_DECR.OTHER Increment or decrement operator is mixed with other operators in expression |
M5-2-11 (req.) |
MISRA.BIN_OP.OVERLOAD Comma, || or && operator overloaded |
M5-2-12 (req.) |
MISRA.FUNC.ARRAY.PARAMS Function argument with array type decay to a pointer |
M5-3-1 (req.) |
MISRA.LOGIC.NOT_BOOL Operand of logical operation is not boolean |
M5-3-2 (req.) |
MISRA.UMINUS.UNSIGNED Operand of unary minus is unsigned |
M5-3-3 (req.) |
MISRA.UN_OP.OVERLOAD Unary & operator is overloaded |
M5-3-4 (req.) |
MISRA.SIZEOF.SIDE_EFFECT Operand of sizeof has side effects |
M5-8-1 (req.) |
MISRA.SHIFT.RANGE Right operand of shift operation is out of range - greater or equal to max bit-length of left operand, or negative |
M5-14-1 (req.) |
MISRA.LOGIC.SIDEEFF Right operand in a logical 'and' or 'or' expression contains side effects |
M5-18-1 (req.) |
MISRA.COMMA Comma operator is used |
M5-19-1 (req.) |
MISRA.COMP.WRAPAROUND Wrap-around in a condition MISRA.ELIF.WRAPAROUND Wrap-around in #elif directive |
M6-2-1 (req.) |
MISRA.ASSIGN.COND Assignment operator is used in a condition MISRA.ASSIGN.SUBEXPR Assignment operator is used in a sub-expression outside a condition |
M6-2-2 (req.) |
MISRA.FLOAT_EQUAL Floating point expression is tested for equality |
M6-2-3 (req.) |
MISRA.NULL.STMT Null statement is not the only statement on line or comments are placed incorrectly |
M6-3-1 (req.) |
MISRA.STMT.NO_COMPOUND The body of switch, while, do/while or for statement is not a compound statement |
M6-4-1 (req.) |
MISRA.IF.NO_COMPOUND The body of if/else statement is not a compound statement |
M6-4-2 (req.) |
MISRA.IF.NO_ELSE A chain of if/else-if statements is not terminated with else or is terminated with an empty else clause |
M6-4-3 (req.) |
MISRA.SWITCH.NOT_WELL_FORMED Switch statement is not well-formed |
M6-4-4 (req.) |
MISRA.SWITCH.LABEL A switch label belongs to nested compound statement inside switch body |
M6-4-5 (req.) |
MISRA.SWITCH.NO_BREAK No break or throw statement at the end of switch-clause |
M6-4-6 (req.) |
MISRA.SWITCH.NODEFAULT No default clause at the end of a switch statement |
M6-4-7 (req.) |
MISRA.SWITCH.BOOL Condition of switch statement is boolean expression |
M6-5-2 (req.) |
MISRA.FOR.COND.EQ ++ or -- operations are not used to change loop counter, but condition tests loop counter for equality |
M6-5-3 (req.) |
MISRA.FOR.COND.CHANGE For loop counter is modified within the loop condition section MISRA.FOR.STMT.CHANGE For loop counter is modified within the loop statement |
M6-5-4 (req.) |
MISRA.FOR.INCR For loop counter is modified in an inappropriate way |
M6-5-5 (req.) |
MISRA.FOR.LOOP_CONTROL.CHANGE.COND Loop control variable is modified in condition section of a for loop MISRA.FOR.LOOP_CONTROL.CHANGE.EXPR Loop control variable is modified in expression section of a for loop |
M6-5-6 (req.) |
MISRA.FOR.LOOP_CONTROL.NOT_BOOLEAN Loop control variable is not boolean |
M6-6-1 (req.) |
MISRA.GOTO.NESTED Goto to a label declared in a nested compound statement |
M6-6-2 (req.) |
MISRA.GOTO.AFTER.LABEL Unconstrained use of goto |
M6-6-3 (req.) |
MISRA.CONTINUE.ILL Continue statement is used in an ill-formed for loop |
M7-1-2 (req.) |
MISRA.PPARAM.NEEDS.CONST Pointer parameter is not used to modify the addressed object but is not declared as a pointer to const |
M7-3-1 (req.) |
MISRA.NS.GLOBAL Function, variable or type declaration in global namespace MISRA.NS.GLOBAL.USING Using directive or declaration in global namespace |
M7-3-2 (req.) |
MISRA.NS.MAIN Non-global function with name 'main' is defined |
M7-3-3 (req.) |
MISRA.NAMESPACE.UNMD Unnamed namespace in header file |
M7-3-4 (req.) |
MISRA.NS.USING_DIR Using directive |
M7-3-6 (req.) |
MISRA.NAMESPACE.DECL Using-declaration in header file MISRA.NAMESPACE.DIR Using-directive in header file MISRA.NS.USING.HEADER Using directive or declaration is used in a header file |
M7-4-2 (req.) |
MISRA.PRAGMA.ASM Incorrect assembler instruction |
M7-4-3 (req.) |
MISRA.ASM.ENCAPS Assembly language is not isolated. |
M8-0-1 (req.) |
MISRA.DECL.MANY_DCLS More than one declarator in one declaration |
M8-3-1 (req.) |
MISRA.SAME.DEFPARAMS Overriding virtual function and the function it overrides have different default arguments |
M8-4-2 (req.) |
MISRA.FUNC.PARAMS.IDENT Identifiers used in declaration and definition of function are not identical |
M8-4-4 (req.) |
MISRA.FUNC.ADDR Address of a function is used without & operator |
M8-5-2 (req.) |
MISRA.INIT.BRACES Incorrect initializer braces placement. |
M9-3-1 (req.) |
MISRA.CONST.RET.NON_CONST Constant member function returns non-const pointer to member variable |
M9-3-3 (req.) |
MISRA.MEMB.NON_CONST Non-const member function does not change any member variables MISRA.MEMB.NON_STATIC Non-static member function does not use other non-static members of the same class |
M9-6-4 (req.) |
MISRA.BITFIELD.SIGNED Length of a named signed bit-field is less than 2 |
M10-1-1 (adv.) |
MISRA.DERIVE.VIRTUAL Class is derived from virtual base |
M10-1-2 (req.) |
MISRA.VIRTUAL.BASE.DIAMOND Base class is used as virtual not in diamond hierarchy |
M10-1-3 (req.) |
MISRA.BASE.VIRTUAL.NOTVIRTUAL Base class is used as both virtual and not virtual in inheritance hierarchy |
M10-2-1 (adv.) |
MISRA.BASE.IDS.UNIQUE Member name is used twice in inheritance hierarchy |
M10-3-3 (req.) |
MISRA.PUREVIRT.OVRD Pure virtual function overrides a non pure virtual function |
M11-0-1 (req.) |
MISRA.MEMB.NOT_PRIVATE Member variable in non-POD class is not private |
M12-1-1 (req.) |
MISRA.CTOR.DYNAMIC Object's dynamic type is used from the body of its constructor MISRA.DTOR.DYNAMIC Object's dynamic type is used from the body of its destructor |
M14-5-3 (req.) |
MISRA.COPYASSIGN.TMPL A copy ssignment operator should be defined when class has a template copy assignment operator with a single generic parameter |
M14-6-1 (req.) |
MISRA.TEMPLMEM.NOQUAL In an instantiated template a member declared in a dependant base is used without a qualificator or 'this' |
M15-0-3 (req.) |
MISRA.TRY.JUMP Control can be transferred into a try block with goto or switch statement |
M15-1-2 (req.) |
MISRA.THROW.NULL NULL is thrown explicitly |
M15-1-3 (req.) |
MISRA.THROW.EMPTY Empty throw expression does not belong to a catch block |
M15-3-3 (req.) |
MISRA.CTOR.TRY.NON_STATIC Function try/catch block of constructor or destructor references non-static members |
M15-3-6 (req.) |
MISRA.CATCH.WRONGORD Handler for a base exception class precedes to a handler for a derived exception class in a try-catch block |
M15-3-7 (req.) |
MISRA.CATCH.NOALL Ellipsis exception handler is not the last one in a try-catch block |
M16-0-1 (req.) |
MISRA.INCL.INSIDE Include directive preceded by a preprocessor output token |
M16-0-2 (req.) |
MISRA.DEFINE.NOTGLOBAL Define not at the global level MISRA.UNDEF.NOTGLOBAL Undef not at the global level |
M16-0-5 (req.) |
MISRA.EXPANSION.DIRECTIVE Directive-like tokens within a macro argument |
M16-0-6 (req.) |
MISRA.DEFINE.NOPARS Macro parameter with no parentheses |
M16-0-7 (req.) |
MISRA.ELIF.UNDEF Undefined macros in #elif directive MISRA.IF.UNDEF Undefined macros in #if directive |
M16-0-8 (req.) |
MISRA.USE.UNKNOWNDIR Unknown preprocessor directive is used |
M16-1-1 (req.) |
MISRA.ELIF.DEFINED Incorrect 'defined' usage in #elif directive MISRA.IF.DEFINED Incorrect 'defined' usage in #if directive |
M16-1-2 (req.) |
MISRA.ELIF.OTHERFILE #elif in an improper file MISRA.ELSE.OTHERFILE #else in an improper file MISRA.ENDIF.OTHERFILE #endif in an improper file |
M16-2-3 (req.) |
MISRA.INCGUARD Include guard is not provided |
M16-3-1 (req.) |
MISRA.DEFINE.SHARP.MANY Several # or ## operators in a macro definition |
M16-3-2 (adv.) |
MISRA.DEFINE.SHARP # or ## operator in a macro definition |
M17-0-2 (req.) |
MISRA.UNDEF.WRONGNAME Undefinition of a name from the standard library MISRA.UNDEF.WRONGNAME.UNDERSCORE Undefinition of a reserved name |
M17-0-3 (req.) |
MISRA.STDLIB.WRONGNAME Reused name of standard library macro, object or function MISRA.STDLIB.WRONGNAME.UNDERSCORE Usage of a reserved name for naming a language entity |
M17-0-5 (req.) |
MISRA.STDLIB.LONGJMP Use of setjmp macro or longjmp function |
M18-0-3 (req.) |
MISRA.STDLIB.ABORT Use of 'abort', 'exit', 'getenv' or 'system' from library stdlib.h |
M18-0-4 (req.) |
MISRA.STDLIB.TIME Use of the time handling functions of library time.h |
M18-0-5 (req.) |
MISRA.STDLIB.CSTRING Function from 'cstring' library is used MISRA.STDLIB.CSTRING.MACRO Macro from 'cstring' library is used |
M18-2-1 (req.) |
MISRA.EXPANSION.UNSAFE Unsafe macro usage |
M18-7-1 (req.) |
MISRA.STDLIB.SIGNAL Use of the signal handling facilities of signal.h |
M19-3-1 (req.) |
MISRA.STDLIB.ERRNO Use of error indicator 'errno' |
M27-0-1 (req.) |
MISRA.STDLIB.STDIO Use of input/output library stdio.h in production code |
Support Summary:
- 228 enforced rules
"MISRA", "MISRA C" and "MISRA C++" are registered trademarks of The MISRA Consortium Limited.