1.5.28. Migration to 7.8.2

1.5.28.1. Stylecheck

MisraC2012Directive-4.5, MisraC++-2.10.1, CertC-DCL02

The implementation for reporting ambiguous names has changed; consequently, reported violations may differ considerably. As specified in MisraC2012Directive-4.5, any combination of case changes, the presence or absence of the underscore character, and the other listed case-sensitive differences are checked. Previously, mixtures of case were checked separately, partly due to the (older) formulation of MisraC++-2.10.1, which used the phrase “only a mixture of case”. This change may lead to more violations. Furthermore, the interchange of the lowercase letter “i” with the digit “1” or lowercase letter “l” (el) has been removed, as it was only part of a (presumably) incorrect MisraC++-2.10.1 example. Both the Misra C and C++ rules now behave identically.

The rule CertC-DCL02 no longer reports the interchange of a lowercase character with its uppercase equivalent, as this is not specified. Fewer violations may result. Enabling the check_case option will additionally treat lowercase and uppercase characters as similar, potentially increasing the number of reported violations.

Unlike Misra, underscores are not considered for CertC-DCL02. While Misra considers the digit “0” similar only to the uppercase letter “O”, Cert also lists the uppercase letters “D” and “Q” as similar to “0”.

Using Python code, the normalizations option can be adjusted as needed (carefully, as order matters); if left empty and case_check is enabled, this results in a simple case comparison.

1.5.28.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 holds (i.e., if pointers are stored in variables of integer type, these integers have at least the bitwidth of the pointer type void*), and using this assumption can accelerate pointer analysis. If the assumption does not hold, the option must now be explicitly set to False.