Skip to content

Commit 297906e

Browse files
author
cpprefjp-autoupdate
committed
update automatically
1 parent d2bd5f5 commit 297906e

File tree

4 files changed

+45
-3166
lines changed

4 files changed

+45
-3166
lines changed

lang/cpp26/erroneous_behavior_for_uninitialized_reads.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@
188188

189189
<p class="text-right"><small>
190190
最終更新日時(UTC):
191-
<span itemprop="datePublished" content="2024-11-11T03:57:15">
192-
2024年11月11日 03時57分15秒
191+
<span itemprop="datePublished" content="2024-11-17T09:49:50">
192+
2024年11月17日 09時49分50秒
193193
</span>
194194
<br/>
195195
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
@@ -245,12 +245,16 @@ <h2>概要</h2>
245245
</div></p>
246246
<h2>仕様</h2>
247247
<ul>
248-
<li>自動記憶域期間をもつオブジェクトの記憶域は確保時点で「エラー性の値 (erroneous value)」をもつとされ、処理系がプログラムの状態に依存せず決定する何らかの値で埋められる</li>
248+
<li>自動記憶域期間をもつオブジェクトの記憶域は確保時点で「エラー性の値 (erroneous value)」をもつとされ、処理系がプログラムの状態に依存せず決定する何らかの値で埋められる<ul>
249249
<li>動的記憶域期間であれば不定値、静的・スレッド記憶域期間であればゼロで埋められる。C++23までは自動記憶域期間も不定値で埋められていた</li>
250+
</ul>
251+
</li>
250252
<li>初期化されなかったスカラ型オブジェクトなど、値表現(パディングは含まない)内のいずれかのビットにエラー性の値をもつオブジェクトはエラー性の値をもつとされる</li>
251-
<li>式が評価された結果としてエラー性の値が生成された場合、<a class="cpprefjp-defined-word" data-desc="エラー性の動作。未定義動作ではないが、誤ったプログラムの結果とされる動作。erroneous behavior (EB)。処理系によって診断や異常終了を実行することが許可されるが、処理が続行する場合もある" href="../../implementation-compliance.html#dfn-erroneous-behavior">エラー性動作</a>を引き起こす</li>
253+
<li>式が評価された結果としてエラー性の値が生成された場合、<a class="cpprefjp-defined-word" data-desc="エラー性の動作。未定義動作ではないが、誤ったプログラムの結果とされる動作。erroneous behavior (EB)。処理系によって診断や異常終了を実行することが許可されるが、処理が続行する場合もある" href="../../implementation-compliance.html#dfn-erroneous-behavior">エラー性動作</a>を引き起こす<ul>
252254
<li>ただし、<code>unsigned char</code>(およびunsignedとなる場合は<code>char</code>)もしくは<code><a href="../../reference/cstddef/byte.html">std::byte</a></code>型のエラー性の値がこれらの型のオブジェクトの初期化・代入に使用される場合や値が破棄される場合は<a class="cpprefjp-defined-word" data-desc="エラー性の動作。未定義動作ではないが、誤ったプログラムの結果とされる動作。erroneous behavior (EB)。処理系によって診断や異常終了を実行することが許可されるが、処理が続行する場合もある" href="../../implementation-compliance.html#dfn-erroneous-behavior">エラー性動作</a>にならない</li>
253255
<li>これらのルールは、式が評価された結果として不定値が生成された場合に<a class="cpprefjp-defined-word" data-desc="処理系は予期せぬ動作をする可能性がある。要するに動作保証対象外。undefined behavior (UB)。" href="../../implementation-compliance.html#dfn-undefined-behavior">未定義の動作</a>を引き起こすとする従来のルールと同様である</li>
256+
</ul>
257+
</li>
254258
<li><a class="cpprefjp-defined-word" data-desc="エラー性の動作。未定義動作ではないが、誤ったプログラムの結果とされる動作。erroneous behavior (EB)。処理系によって診断や異常終了を実行することが許可されるが、処理が続行する場合もある" href="../../implementation-compliance.html#dfn-erroneous-behavior">エラー性動作</a>を引き起こしたうえで生成された値は、後続の処理ではエラー性の値とはみなされない</li>
255259
</ul>
256260
<p><div class="yata" id="d493f9173ce919031e6a194f87d399957ba5406f"><div class="codehilite"><pre><span></span><code><span class="cp">#include</span> <span class="cpf"><a href="../../reference/cassert.html">&lt;cassert&gt;</a></span><span class="cp"></span>

reference/chrono/make24.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ <h2>例</h2>
239239
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">12h</a></span><span class="p">,</span> <span class="nb">false</span><span class="p">)</span> <span class="o">==</span> <span class="n"><a href="duration/op_h.html">0h</a></span><span class="p">);</span>
240240

241241
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">12h</a></span><span class="p">,</span> <span class="nb">true</span><span class="p">)</span> <span class="o">==</span> <span class="n"><a href="duration/op_h.html">12h</a></span><span class="p">);</span>
242-
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">1h</a></span><span class="p">,</span> <span class="nb">true</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="n"><a href="duration/op_h.html">3h</a></span><span class="p">);</span>
242+
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">1h</a></span><span class="p">,</span> <span class="nb">true</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1L</span><span class="n">NHuDpHKVpqXQZhPQaJvlwWuMUAlRhDA</span><span class="p">);</span>
243243
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">3h</a></span><span class="p">,</span> <span class="nb">true</span><span class="p">)</span> <span class="o">==</span> <span class="n"><a href="duration/op_h.html">15h</a></span><span class="p">);</span>
244244
<span class="n"><a href="../cassert/assert.html">assert</a></span><span class="p">(</span><span class="n"><span style="color:#ff0000">chrono::make24</span></span><span class="p">(</span><span class="n"><a href="duration/op_h.html">11h</a></span><span class="p">,</span> <span class="nb">true</span><span class="p">)</span> <span class="o">==</span> <span class="n"><a href="duration/op_h.html">23h</a></span><span class="p">);</span>
245245
<span class="p">}</span>

0 commit comments

Comments
 (0)