MISRA C Rule­6.1 0635 Rule­7.2 1281

 时间:2024-10-12 20:52:47

、struct/union中的位域被声明为除int、signed int或unsigned int外的其他类型 ; 整型常量是无符号类型,但没有使用后缀符'U' 。

工具/原料

Rule­6.1 0635 Rule­7.2 1281

MISRA C:2012

Rule­6.1 0635

1、规则与等级对应关系(QAC)

MISRA C Rule­6.1 0635 Rule­7.2 1281

2、 罕铞泱殳 0635 [E] Bit-fields in this struct/u荏鱿胫协nion have been declared with types other than int, signed int or unsigned int.struct/union中的位域被声明为除int、signed int或unsigned int外的其他类型

3、根据ISO:C 标准,位域只能定义为以下类型:int/unsigned int/signed int。有些编译器髹瑕扔麝支持一些其他整型,比如char,short和enum。这属于语言的扩展,且是不可移植的。在struct或union声明中,无论含有多少非标准位域,消息0635只会生成一次。

MISRA C Rule­6.1 0635 Rule­7.2 1281

Rule­7.2 1281

1、规则与等级对应关系(QAC)

MISRA C Rule­6.1 0635 Rule­7.2 1281

2、 罕铞泱殳 1281 Integer literal constant is of 锾攒揉敫an unsigned type but does not include a "U" suffix. 这是整型常量是无符号类型,但没有使用后缀符 'U' 。注意:一个整数常量的类型,依赖于常量的值大小、'int'型被实现的大小(即是说 'int' 型是16位还是32位)以及出现的后缀符。

3、官方示例

MISRA C Rule­6.1 0635 Rule­7.2 1281
  • 如何快速找到萝卜快跑软件上意见反馈的入口?
  • LOL手游涂鸦怎么获取
  • 怎样让孩子早点上床睡觉
  • 这些花卉不要再在室内养了,放时间长了会损害你的健康!
  • 疯狂猜成语3 开卷有益第111关攻略答案
  • 热门搜索
    湄洲岛旅游 中国旅游地理 三亚旅游景点排名 万达旅游城 山西旅游景点地图 沙巴旅游 南京旅游网 江浙沪旅游景点排行 河北省旅游局 旅游报告