We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f7759e commit 6b0e3d7Copy full SHA for 6b0e3d7
lang/cpp26/erroneous_behavior_for_uninitialized_reads.md
@@ -57,7 +57,7 @@ int g(bool b) {
57
unsigned char c;
58
unsigned char d = c; // 誤り起因動作ではない。dは誤り起因動作を引き起こす未初期化値をもつ
59
60
- assert(c == d); // どちらの変数も整数昇格され誤り起因動作となる
+ assert(c == d); // 常に真、誤り起因動作 (整数昇格)
61
62
int e = d; // 誤り起因動作 (型変換)
63
return b ? d : 0; // bがtrueの場合に誤り起因動作
@@ -70,10 +70,11 @@ int main() {
70
int e2 = d1; // 誤り起因動作
71
72
// 処理が続行した場合…
73
- assert(e1 == e2); // OK。誤り起因動作の結果で生成された値 (e1とe2) は、
+ assert(e1 == e2); // 常に真、誤り起因動作ではない。
74
+ // 誤り起因動作の結果で生成された値 (e1とe2) は、
75
// 誤り起因動作を引き起こす値とはみなされない
- assert(e1 == d1); // 誤り起因動作
76
- assert(e2 == d1); // 誤り起因動作
+ assert(e1 == d1); // 常に真、誤り起因動作
77
+ assert(e2 == d1); // 常に真、誤り起因動作
78
79
// 誤り起因動作ではないが
80
// d2は誤り起因動作を引き起こす未初期化値をもつ
0 commit comments