MISRA C:2012 Rule 1.2
Language extensions should not be used
描述
规则定义
Language extensions should not be used 1 .
理由
如果程序使用语言扩展,则其可移植性就会降低。即使您记录了这些语言扩展,该文档也可能无法描述所有情况下的行为。
Polyspace 实现
此规则检查项会根据分析中使用的 C 标准版本标记这些语言扩展。请参阅 C 标准版本 (-c-version)。
C90:
包括常量的
long long int类型long double类型inline关键字_Bool关键字十六进制浮点常量
指定初始化函数
局部标签声明
typeof运算符转换为并集
复合字面值
表达式中的语句和声明
__func__预定义标识符_Pragma预处理运算符具有可变参量列表的宏
asm函数匿名并集
空
struct
C99:
short long int类型局部标签声明
typeof运算符转换为并集
表达式中的语句和声明
asm函数匿名并集
空
struct
故障排除
如果您预期会出现违规,但未看到该违规,请参阅诊断为何编码规范违规未按预期显示。
检查信息
| 组:标准 C 环境 |
| 类别:建议 |
| AGC 类别:建议 |
版本历史记录
在 R2014b 中推出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.