MISRA_Compliancy_C++

The code that is generated during the UML to C++ operation is compliant with all the MISRA C++ rules, except those that are listed below.

This page discusses:

Test Conditions

Testing tool: Cppcheck 26.03.0 Generator: UML to C++ code generator V100 MISRA: MISRA C++ 2023

MISRA C++ Rules Violation

The generated code is not compliant with the following MISRA C++ rules.

Defect ID MISRA rule description Scope Justification
premium-misra-cpp-2023-0.2.1 Variables with limited visibility should be used at least once NA Respect the model.
premium-misra-cpp-2023-0.2.2 A named function parameter shall be used at least once NA This function contains a user section and its parameter can be used in this user section.
premium-misra-cpp-2023-5.7.2 Sections of code should not be commented out NA Code is commented to allow compilation (other language).
premium-misra-cpp-2023-6.0.3 The only declarations in the global namespace should be main, namespace declarations and extern C declarations All No namespace defined.
premium-misra-cpp-2023-6.7.2 Global variables shall not be used All The current implementation of the code generator uses it.
premium-misra-cpp-2023-6.9.2 The names of the standard signed integer types and standard unsigned integer types should not be used NA Only in opaque behavior.
premium-misra-cpp-2023-10.2.2 Unscoped enumerations should not be declared All Current implementation.
premium-misra-cpp-2023-11.3.1 Variables of array type should not be declared CSE layer Current implementation.
premium-misra-cpp-2023-13.3.1 User-declared member functions shall use the virtual, override and final specifiers appropriately. Overriden function must not use the virtual specifier, and must have either the override or final specifier but not both NA Respect the model.
premium-misra-cpp-2023-14.1.1 Non-static data members should be either all private or all public NA Respect the model.
premium-misra-cpp-2023-15.0.1 Special member functions shall be provided appropriately. Copy-enabled class must have customized copy constructor NA Respect the model.
premium-misra-cpp-2023-19.0.3 #include directives should only be preceded by preprocessor directives or comments Class.h Required for the current implementation of the code generator.
premium-misra-cpp-2023-21.6.1 Dynamic memory shall not be used NA Generated code respects the model (multiplicity *).

Misra C++ 2023 Checked Rules

The rules that are checked are listed here: Misra C++ 2023.