Parasoft Logo

See Parasoft C/C++test in action!

Schedule a personalized demo.

Request a Demo

WEBINAR

Watch MISRA C 2025: Everything You Need to Know

Watch Michal Rozenau, a contributing member of the MISRA C 2025 development team, give an in-depth look at MISRA C 2025.

MISRA C 2025: What’s New and Why It Matters

MISRA C 2025 builds on MISRA C 2023 by refining compliance guidelines, removing obsolete rules, and strengthening best practices. It’s designed to lower compliance overhead by removing obsolete rules and reinforcing coding best practices. In particular, functional safety is enhanced through stricter rules on unions and pointers that decrease undefined behavior risks. Additionally, developers now have increased flexibility to terminate switch clauses, like return and continue, allowing them to streamline audits and avoid time delays.

This session also showcases how Parasoft C/C++test provides complete MISRA compliance coverage and integrates seamlessly into modern development workflows. Parasoft’s 100% early support for MISRA C 2025 ensures that teams can adopt the latest coding standards immediately, avoiding costly rework and staying ahead in competitive markets.

Key Highlights

  • Enhancements and new guidelines
  • Policy changes
  • Clarification around AI-generated code
  • Integrating into the CI/CD pipeline easily
  • Applying patented AI/ML for productivity

Understanding Static Analysis and Shifting Left

Static analysis is a method for finding bugs and code issues by looking at the source code without executing the application. It’s done early in the development process, which is often called “shifting left.” This is important because fixing problems early is much cheaper and easier than fixing them later, especially after the software has been released.

Beyond just finding bugs, static analysis helps keep coding standards high. This is super important for systems where safety and security are critical, like in medical devices, aircraft, and autonomous vehicles. Standards like MISRA and AUTOSAR C++ 14 help with this. Not all tools fully support these standards, but Parasoft’s static analysis does.

Static analysis is also automated and repeatable. You don’t need to write specific test cases for it like you do for unit or integration testing. It also gives you insights into code quality metrics like complexity and readability, helping developers become better overall.

The Evolution of MISRA C: From 2023 to 2025

MISRA C is a popular set of coding guidelines for safety-critical applications, used across automotive, railway, aerospace, defense, medical, and industrial automation sectors. The latest version, MISRA C 2025, is an incremental update to MISRA C 2023.

Here’s a look at the changes:

  • New Rules: 4 new rules have been introduced.
  • Removed Rules: 2 rules have been removed but their practices are covered by other guidelines.
  • Disapplied Rule: 1 rule has been disapplied by default.
  • Renumbered Rules: 3 rules have been moved to more suitable sections.
  • Modified Rules: 13 rules have been updated.

In total, MISRA C 2025 contains 224 guidelines.

Key Takeaways from MISRA C 2025 Updates

  • New Restrictions: Disallows tentative definitions in headers and external declarations in source files. Implicit comparison of pointers to null is now explicitly forbidden. Reading a union member that hasn’t been set is also disallowed, with an exception for character array members.
  • Pointer to Integer Conversion: Converting pointers to integer types now requires an explicit deviation procedure, with rule 11.4 changing from advisory to required.
  • Include Guards: The requirement for unique include guard macro identifiers across a project is now clearer.
  • Relaxed Restrictions: No longer requires specific typedefs for floating-point types. Allows conversions between pointers and integer types, and immediate conversion of newly allocated memory to a specific pointer type.
  • Switch Statements: Switch clauses can now be terminated with statements other than break, such as calling abort or using return.
  • Multiple Return Statements: The rule against multiple return statements in a function is now disapplied by default, acknowledging that structured languages like C don’t violate the single point of exit principle.

MISRA and AI-Generated Code

To ensure code quality MISRA treats AI generated code as if it were handwritten, so the same MISRA coding guidelines apply.