主要内容

本页翻译不是最新的。点击此处可查看最新英文版本。

MISRA C:2012 Dir 2.1

All source files shall compile without any compilation errors

描述

指令定义

All source files shall compile without any compilation errors 1 .

理由

即使存在编译错误,符合要求的编译器仍可生成对象模块。然而,执行生成的程序可能会产生意外的行为。

Polyspace 实现

如果软件发现编译错误,则会提出违反此指令。

故障排除

如果您预计存在违规,但未看到该违规,请参阅Diagnose Why Coding Standard Violations Do Not Appear as Expected

检查信息

组:编译和构建
类别:必需
AGC 类别:必需

版本历史记录

在 R2015b 中推出


1 All MISRA coding rules and directives are © Copyright The MISRA Consortium Limited 2021.

The MISRA coding standards referenced in the Polyspace® Bug Finder™ documentation are from the following MISRA standards:

  • MISRA C:2004

  • MISRA C:2012

  • MISRA C:2023

  • MISRA C++:2008

  • MISRA C++:2023

MISRA and MISRA C are registered trademarks of The MISRA Consortium Limited 2021.