Software update

Cppcheck Premium 26.9.0 Released

Cppcheck Premium 26.9.0 improves MISRA, CERT, and AUTOSAR analysis accuracy, with enhanced rule checks and fewer false positives and false negatives.

Discover the updates in Cppcheck Premium version 26.9.0!

Cppcheck Premium 26.9.0 is now available. This release focuses on improving detection accuracy across MISRA, CERT, and AUTOSAR standards, with refined rule checks and better handling of a wide range of C and C++ code patterns. Numerous false positives and false negatives have been addressed, alongside improvements to existing CERT checks and MISRA rule reporting.

Cppcheck Premium 26.9.0 is based on Cppcheck 2.22.0. See the Cppcheck 2.22.0 release notes for changes in the open source core.

What’s New in 26.9.0

New features and improvements:

• Added <symbolName> attribute for Misra C++ 2023 rules 0.1.2 (ADDON-736), 7.11.2 (ADDON-807),
8.2.2 (ADDON-739) and 8.2.6 (ADDON-740).
• Misra C 10.4: added notes about literal suffixes (ADDON-729).
• Misra C 11.4: better location when the cast is in an expanded macro (ADDON-800).
• Fixed wrong warning id for Misra C++ 2023 directive 5.7.2 (ADDON-814).
• Fixed wrong output for CERT MSC30-C (ADDON-767).

 

Improved checks:

  • CERT MEM50-CPP: allocating 0 bytes and dereferencing the pointer (ADDON-156).
  • CERT MEM56-CPP: shared_ptr assigned the internal pointer of another shared_ptr (ADDON-166).
  • CERT MSC54-CPP: exception handler with try/catch (ADDON-168).


False negatives fixed:

  • Misra C 2.2: division by 1 (ADDON-776).
  • Misra C 2.4: tag in typedef only used implicitly (ADDON-487).
  • Misra C 8.2: void* parameter (ADDON-808).
  • Misra C 8.5: declarations both in source and header (ADDON-454).
  • Misra C 17.5: argument pointer variable not checked (ADDON-616).
  • Misra C 20.6: #ifdef/#else/#endif directives inside macro arguments (ADDON-591).
  • Misra C 21.14: pointers to null-terminated strings produced by string functions (ADDON-697).
  • Misra C++ 2023 7.0.5: arithmetic between int and unsigned int (ADDON-809).
  • Misra C++ 2023 8.1.1: lambda in a regular function (ADDON-828).
  • Misra C++ 2023 9.5.2: implicit function call (ADDON-830).
  • Misra C++ 2023 10.2.3: non-variable enums (ADDON-831).
  • Misra C++ 2023 21.6.2: new in member initialization list (ADDON-833).
  • Misra C++ 2023 21.10.1: use of features from <cstdarg> (ADDON-702).

 

False positives fixed:

• Misra C 5.6: typedef name matching its own associated tag (ADDON-771).
• Misra C 8.2: named 'void *' parameter (ADDON-727).
• Misra C 8.18: initialized static object in header flagged as tentative definition (ADDON-751).
• Misra C 10.3: removed positive-constexpr, there is an explicit exception (ADDON-743).
• Misra C 11.1: cast of function-pointer parameter to void (ADDON-779).
• Misra C 12.2: essential type computed as unsigned char instead of unsigned int (ADDON-799).
• Misra C 14.2: write through dereferenced counter (ADDON-726), for loop initialization by
function (ADDON-761), different structure member modified in loop body (ADDON-791).
• Misra C 17.3: macro offsetof (ADDON-734), function declared only via --library (ADDON-763),
function mentioned in posix.cfg (ADDON-781).
• Misra C 17.8: ptr->a = 42 (ADDON-735).
• Misra C 17.11: function is returning (ADDON-731), function call in while loop that modifies
variable (ADDON-775), function call/post decrement in loop condition (ADDON-818).
• Misra C 17.12: _Generic (ADDON-842).
• Misra C 21.2 / CERT DCL37-C: non-file-scope identifiers starting with underscore (ADDON-764).
• Misra C Dir 4.10: #pragma once (ADDON-752).
• misra-config: unknown function (ADDON-810), sizeof(struct S) (ADDON-844).
• Misra C++ 2023 6.7.2: constexpr (ADDON-719).
• Misra C++ 2023 7.0.5: uintN_t + uint32_t (ADDON-737).
• Misra C++ 2023 8.2.2: function pointer initialization (ADDON-717).
• Misra C++ 2023 8.2.5: exception for cast not applied (ADDON-741).

• AUTOSAR A0-1-3: template specializations (ADDON-522).
• AUTOSAR A5-2-2: (void) cast (ADDON-856), template arguments (ADDON-859).

• CERT ERR33-C: return value explicitly cast to void (ADDON-698).
• CERT EXP20-C: explicit equality comparison such as foo() == -1 (ADDON-732).
• CERT EXP30-C: lambda call (ADDON-689).
• CERT EXP34-C: overloaded arrow operator (ADDON-864).
• CERT EXP36-C: target type is packed (alignment == 1) (ADDON-526).
• CERT MSC40-C: does not apply to C++ (ADDON-843), const variable (ADDON-845).
• CERT STR30-C: no string literal (ADDON-754).
• CERT DCL56-CPP: incorrect "recursive initialization" warning (ADDON-648).



Summary

Cppcheck Premium 26.9.0 improves analysis accuracy across MISRA C, MISRA C++ 2023, CERT C/C++, and AUTOSAR rule sets. The release includes enhanced CERT checks, improved MISRA rule handling and reporting, and numerous fixes for false positives and false negatives across C and C++ analysis.

Similar posts