日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

c语言int a什么意思,问一下吧里大神 int a = a; 这么定义是什么意思?

發布時間:2025/3/11 47 豆豆
生活随笔 收集整理的這篇文章主要介紹了 c语言int a什么意思,问一下吧里大神 int a = a; 这么定义是什么意思? 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

該樓層疑似違規已被系統折疊?隱藏此樓查看此樓

使用自身初始化,具有indeterminate value,可能是trap representation導致使用這個對象的值引起undefined behavior。但這個初始化語法上是正確的,也沒有語義錯誤。

ISO C11

3.19.2

1 indeterminate value

either an unspecified value or a trap representation

3.19.3

1 unspecified value

valid value of the relevant type where this International Standard imposes no requirements on which value is chosen in any instance

2 NOTE An unspecified value cannot be a trap representation.

3.19.4

1 trap representation

an object representation that need not represent a value of the object type

6.1

7 Structure, union, and enumeration tags have scope that begins just after the appearance of the tag in a type specifier that declares the tag. Each enumeration constant has scope that begins just after the appearance of its defining enumerator in an enumerator list. Any other identifier has scope that begins just after the completion of its declarator.

6.2.6.1

5 Certain object representations need not represent a value of the object type. If the stored value of an object has such a representation and is read by an lvalue expression that does not have character type, the behavior is undefined. If such a representation is produced by a side effect that modifies all or any part of the object by an lvalue expression that does not have character type, the behavior is undefined.50) Such a representation is called a trap representation.

50) Thus, an automatic variable can be initialized to a trap representation without causing undefined behavior, but the value of the variable cannot be used until a proper value is stored in it.

6.7.9

10 If an object that has automatic storage duration is not initialized explicitly, its value is indeterminate. ...

總結

以上是生活随笔為你收集整理的c语言int a什么意思,问一下吧里大神 int a = a; 这么定义是什么意思?的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。