没有合适的资源?快使用搜索试试~ 我知道了~
首页MISRA C 2004.doc
资源详情
资源评论
资源推荐
MISRA C 2004
一、开发环境(Environment)
二、语言外延(Language Extensions)
三、注释(Documentaon)
四、字符集(Character Sets)
五、标识符(Iden!ers)
六、类型(Types)
七、常量(Constants)
八、声明和定义(Declaraons and De!nions)
九、初始化(Inialisaon)
十、算术类型转换(Arithmec Type Conversion)
十一、指针类型转换(Point Type Conversion)
十二、表达式(Expressions)
十三、控制表达式(Control Statement Expressions)
十四、控制流(Control Flow)
十五、Switch 语句(Switch Statements)
十六、函数(Funcons)
十七、指针和数组(Pointers and Arrays)
十八、结构体和联合体(Structures and Unions)
十九、预处理命令(Preprocessing Direcves)
二十、标准库(Standard Libraries)
二十一、运行失败(Run-Time Failures)
一、开发环境(Environment)
1.1 All code shall conform to ISO 9899:1990“Programming languages – C”, amended and
corrected by ISO/IEC 9899/COR1:1995, ISO/IEC 9899/AMD1:1995, and ISO/IEC 9899/COR2:1996.
翻译:
1.2 No reliance shall be placed on unde!ned or unspeci!ed behaviour.
翻译:
1.3 Mulple compilers and/or languages shall only be used if there is a common de!ned interface
standard for object code to which the languages/compilers/assemblers conform.
翻译:
1.4 The compiler/linker shall be checked to ensure that 31 character signi!cance and case
sensivity are supported for external iden!ers.
翻译:
1.5 Floang-point implementaons should comply with a de!ned ;oang-point standard.
翻译:
二、语言外延(Language Extensions)
2.1 Assembly language shall be encapsulated and isolated.
翻译:
2.2 Source code shall only use /* … */ style comments.
翻译:
2.3 The character sequence /* shall not be used within a comment.
翻译:
2.4 Secons of code should not be “commented out”.
翻译:
三、注释(Documentaon)
3.1 All usage of implementaon-de!ned behaviour shall be documented.
翻译:
3.2 The character set and the corresponding encoding shall be documented.
翻译:
3.3 The implementaon of integer division in the chosen compiler should be determined,
documented and taken into account.
翻译:
3.4 All uses of the #pragma direcve shall be documented and explained.
翻译:
3.5 If it is being relied upon, the implementaon de!ned behaviour and packing of bi?ields shall
be documented.
翻译:
3.6 All libraries used in producon code shall be wri@en to comply with the provisions of this
document, and shall have been subject to appropriate validaon.
翻译:
四、字符集(Character Sets)
4.1 Only those escape sequences that are de!ned in the ISO C standard shall be used.
翻译:
4.2 Trigraphs shall not be used.
翻译:
文章出处:DIY 部落(h@p://www.diybl.com/course/3_program/c++/cppjs/2007918/71855.html)
二、语言外延(Language Extensions)
2.1 Assembly language shall be encapsulated and isolated.
翻译:
2.2 Source code shall only use /* … */ style comments.
翻译:
2.3 The character sequence /* shall not be used within a comment.
翻译:
2.4 Secons of code should not be “commented out”.
翻译:
三、注释(Documentaon)
3.1 All usage of implementaon-de!ned behaviour shall be documented.
翻译:
3.2 The character set and the corresponding encoding shall be documented.
翻译:
3.3 The implementaon of integer division in the chosen compiler should be determined,
documented and taken into account.
翻译:
3.4 All uses of the #pragma direcve shall be documented and explained.
翻译:
3.5 If it is being relied upon, the implementaon de!ned behaviour and packing of bi?ields shall
be documented.
翻译:
3.6 All libraries used in producon code shall be wri@en to comply with the provisions of this
document, and shall have been subject to appropriate validaon.
翻译:
四、字符集(Character Sets)
4.1 Only those escape sequences that are de!ned in the ISO C standard shall be used.
翻译:
4.2 Trigraphs shall not be used.
五、标识符(Iden!ers)
5.1 Iden!ers (internal and external) shall not rely on the signi!cance of more than 31
characters.
翻译:
5.2 Iden!ers in an inner scope shall not use the same name as an iden!er in an outer scope,
and therefore hide that iden!er.
翻译:
5.3 A typedef name shall be a unique iden!er.
翻译:
5.4 A tag name shall be a unique iden!er.
翻译:
5.5 No object or funcon iden!er with stac storage duraon should be reused.
翻译:
5.6 No iden!er in one name space should have the same spelling as an iden!er in another
name space, with the excepon of structure and union member names.
翻译:
剩余10页未读,继续阅读
longlihua
- 粉丝: 1
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- RTL8188FU-Linux-v5.7.4.2-36687.20200602.tar(20765).gz
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
- SPC统计方法基础知识.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论2