Featured Webinar: AI-Enhanced API Testing: A No-Code Approach to Testing | Watch Now

Abstract connectivity background image

MISRA C 2023 & MISRA C++ 2023 Complete Support

Developers widely use the MISRA rules and coding standards compliance in businesses beyond the automotive industry, such as medical and medical devices, military, aerospace, industrial automation, rail, and energy. The standards provide a set of guidelines for writing embedded C and C++ code,  and facilitate the development of safe, secure, and portable code for safety- and security-critical systems.

Get the MOST EXTENSIVE coverage for MISRA C compliance! LEARN MORE >> 

What Is MISRA?

The Motor Industry Software Reliability Association (MISRA) refers to the widely adopted and legendary coding standard for C and C++ languages. MISRA provides a comprehensive set of coding guidelines that focuses on protecting applications against known safety violations and security vulnerabilities. The Association classifies guidelines as either a “rule” or a “directive.”

A rule comes with a complete description of the coding requirement, and through static analysis, developers can use it to check that source code complies with a guideline without the need to seek out any other information. A directive, on the other hand, offers an important prescription or development guidance for developers to follow when it’s generally not possible for them to perform a check for compliance.

MISRA is a consortium of automotive-related industries that came together in the early 1990s as a result of the United Kingdom’s Safety Critical Systems Research Programme. The U.K. government instituted this program to address some of the challenges that the automobile industry faced due to auto and truck makers increasing the use of software in the manufacture and operation of road vehicles. Parasoft is a member of the MISRA C and MISRA C++ Working Group.

MISRA Working Group Member

MISRA EXPERT

Michal Rozenau

Michal Rozenau has been an active member of the MISRA C and MISRA C++ Working Group.

The Most Extensive MISRA Coverage

MISRA Expertise

As a participant in MISRA’s C and C++ working groups actively developing MISRA, Parasoft helps define the standard and is committed to swiftly performing product updates. Customers are supported with the latest technologies to continuously reduce costs and deliver safe, secure, reliable, and compliant software.

MISRA C 2023

MISRA C 2023 consolidates MISRA C 2012 and all the amendments and corrigendums that have been released to date. The standard supports the C programming language, versions C90, C99, C11, and C18. Parasoft C/C++test fully supports MISRA C 2023 and has made it available to software development teams looking to ensure deployment of code that’s compliant with the latest coding standard in safety and security.

MISRA C++ 2023

MISRA C++ 2023 advances the lineage that MISRA C++ 2008 and AUTOSAR C++ 14 started in support of the C++ programming language, C++17. Parasoft C/C++test provides 100% coverage of this new standard. With Parasoft C/C++test, software engineers have the ability to scan modern C++ code and ensure that the applications that use C++17 and C++20 are the safest and most secure possible.

“MISRA”, “MISRA C” and the triangle logo are registered trademarks of The MISRA Consortium Limited. ©The MISRA Consortium Limited, 2021. All rights reserved.

Banner with blue background and headshots of three speakers on the right.
Banner with blue background and headshots of three speakers.

Want to Learn More?

Watch On-Demand Webinar »

Benefits of MISRA

When developers implement MISRA guidelines, it helps them deliver safe, secure, and reliable code that has everlasting benefits. MISRA compliance impacts your product’s success and longevity while reducing labor costs and time to market.

Increase code quality and reduce the cost of defects.

Prevent code defects earlier in the product development process before they cascade into more expensive challenges down the line.

Satisfy industry process standards.

Parasoft offers MISRA static analysis as the solution recommended by process standards like ISO 26262, DO-178C, IEC 62304, IEC 61508, EN 50128, and more.

Satisfy static analysis security testing (SAST).

Weave MISRA security code rules and directives right into your software development lifecycle as part of your SAST strategy.

Expand from MISRA and build your own custom coding guidelines.

Create your own custom, coding-standards configuration for your organization using our RuleWizard.

Combine coding standards like CERT with MISRA to get the optimum code quality.

Parasoft offers the aggregation of standards like MISRA with any and all our other supported coding standards: CERT, CWE, OWASP, UL 2900, and others.

Incorporate MISRA SA into your CI/CD workflow.

Parasoft’s MISRA static analysis integrates easily into your streamlined CI/CD pipeline with continuous testing that delivers high-quality, safe, and secure software quickly.

Test smarter with AI and ML.

Parasoft incorporates artificial intelligence and machine learning to improve productivity in your team’s MISRA static analysis workflow, flagging and prioritizing the rule violations that the team needs to fix first.

Solutions to Help Meet MISRA Requirements

Deploy Parasoft’s suite of products to conduct static analysis of code no matter which development environment you work in.

Parasoft C/C++test executes static analysis by integrating tightly into your C and C++ development environment, detecting defects early and automatically enforcing compliance with industry standards. It enables compliance with standards MISRA C:2023, MISRA C:2012, MISRA C++:2023, AUTOSAR C++14, JSF, HIC++, CERT C/C++, and CWE Top 25 and On the Cusp.

Designed to shine in the modern Agile DevOps and DevSecOps framework, Jtest works in the Java development environment. Deploy this testing solution to execute Java-code quality checkers and comply with a suite of functional safety and security standards. Jtest enables and helps achieve compliance with standards OWASP, CWE Top 25 and On the Cusp, and PCI DSS.

Supporting the Microsoft development environment, dotTEST ensures code quality and compliance with industry standards. It enables compliance with standards OWASP, CWE Top 25 and On the Cusp, and PCI DSS.

MISRA Compliance Best Practices

When it comes to MISRA compliance, we recommend several highly beneficial practices. Here is a list of some of the methods to consider.

Perform Code/Peer Reviews

In addition to MISRA compliance, convene with your fellow software engineers and systematically check each other’s code for mistakes and coding style violations. Experience shows that this activity accelerates production and substantially improves code quality.

Code Clarity

MISRA compliance helps you write code that is easy to read and understand. Don’t be too clever and write cryptic code that’s hard to follow or easily misunderstood. You don’t want other engineers or yourself to spend a lot of time trying to decipher a bug in your code.

Code Robustness

When you achieve MISRA compliance, it helps you write reliable code that not only handles the sunny day scenarios but rainy days, too. This includes negative scenarios that prepare your application if it comes up against invalid data.

Code Portability

MISRA compliance helps programmers write code with portability in mind because portable code, like POSIX and ANSI C, allows easy and quick moves to other platforms. Developers can adapt other compilers or other operating systems with minimum code changes. Many times there are financial or business opportunities when migrating to another operating system or target needs to happen.

Code Complexity

MISA compliance helps coders write code that does not have a large number of branches. The more branches, the higher the code complexity and the higher the number of potential bugs in the code.

Code Reusability

MISRA compliance helps you write portable code that you can reuse in future products or projects. This improves productivity and reduces labor and testing costs.

Properly Log Your Deviations

Any MISRA guideline deviation requires thorough documentation on which guideline, scope, justification, safety assurance, consequences, and mitigation.

Reduce MISRA Noise

Coders may write some code constructs in a way that triggers a MISRA violation. Parasoft provides a method to knowingly filter out this noise.

Adopting MISRA Compliance

A great thing about proposing MISRA compliance is that security teams can introduce and use the guidelines at any software development phase of a project, and the guidelines are effective even if a project is incomplete and partially coded.

The biggest challenge with introducing MISRA compliance is that a large amount of code can produce a large number of warnings. Therefore, companies should focus on getting the team productive as soon as possible when integrating MISRA compliance into a project.

Companies should also concentrate on minimizing the possibility of the static analysis warnings overwhelming the team. As achieving MISRA compliance becomes part of the developers’ daily routine, the developers can analyze results quicker and fix bugs more efficiently.

Product Maturity Considerations

It’s also important to consider the maturity of the product under development, as this impacts the way the company can adopt MISRA compliance.

Existing Project Out in the Market

The primary approach to adopting MISRA compliance for these projects is called “acknowledge and defer.” Since developers are adding little new code, all of the safety bugs and security vulnerabilities they discover add to the existing technical debt.

Existing Project With Current Development

The recommended approach to MISRA compliance is called “a line in the sand” approach. At a high level, this approach means developers improve new code as they develop it while deferring less critical warnings as technical debt.

New Project

Developers can integrate MISRA compliance in their development environments from the start, ensuring a high standard of quality code as they write it. The approach to adoption, in this case, is aptly named “greenfield.”

MISRA C 2023 Compliance dashboard in Parasoft DTP.

Automated Compliance Reporting Example

Parasoft’s analytics dashboard with automated compliance reporting. For safety and security-critical applications, you’ll want to use our TÜV SÜD certified solution on safety-critical systems.

Light blue banner with white connectivity overlay.

Why Parasoft?

Parasoft C/C++test detects complex MISRA compliance runtime-like problems early in the development stage — without the need to execute costly runtime tests. C/C++test analyzes the execution paths through the code and finds MISRA compliance issues, like null pointer dereferencing, division by zero, memory leaks, and security vulnerabilities, such as arithmetic on a pointer operand, buffer overflows, unreachable code, and stdlib system function.

Users can view results from C/C++test’s MISRA compliance in Parasoft’s dynamic reporting dashboard, enabling automated post-processing and advanced reporting strategies using historical data. It’s easy to see MISRA compliance results across builds over time, even when working with large codebases and legacy code where visibility into the code is typically challenging so you can quickly focus on the quality of the newly added code.

With widgets that automatically track MISRA compliance, users get a dynamic view into the software compliance process, and can easily produce automatic reports for code audits and certification goals.

Frequently Asked Questions