1.4.17. Migration to 7.8.2¶
1.4.17.1. Stylecheck¶
MisraC2012Directive-4.5, MisraC++-2.10.1, CertC-DCL02¶
The implementation for reporting ambiguous names has changed so that reported violations may be considerably different. As stated for MisraC2012Directive-4.5 any combination of case change, presence or absence of the underscore character, and the other listed case-sensitive differences are checked. Before, a mixture of case was checked separately, partly due to the (older) MisraC++-2.10.1 formulation of this rule using the phrase “only a mixture of case”. This change may lead to more violations. Furthermore, the interchange of the small letter “i” with digit “1” or small letter “l” (el) has been removed as it was only part of a (presumably) wrong MisraC++-2.10.1 example. Both Misra C and C++ rules behave in the same way.
The rule CertC-DCL02 has been changed to no longer report the interchange or lowercase
character with its uppercase equivalent as this is not specified. Less violations may
result. Enabling the option check_case would additionally make lowercase and
uppercase characters similar to each other and potentially increase the reported
violations.
Comparing Cert and Misra, underscores are not considered for CertC-DCL02. While Misra considers the digit “0” to be similar to the capital letter “O” only, Cert also lists the capital letter “D” and “Q” as being similar to “0”.
Using Python code the option normalizations could be adjusted as needed
(carefully – because order matters), leading to a mere case comparison if made empty
and case_check is enabled.
1.4.17.2. StaticSemanticAnalysis configuration¶
The default value of the configuration option global_classic_options.restrict_bit_size_for_integers_storing_pointers (rule StaticSemanticAnalysis) has been set to True. For almost all modern analyzed projects, the assumption of this rule (i.e., if pointers are stored in variables of integer type, these integers have at least the bitwidth of the pointer type void*) holds, and using the assumption can accelerate the pointer analysis. If the assumption does not hold, the option has to be set to False explicitly now.