From 09a96cdfce0540e4c02dd3b0917de6b59edbc95c Mon Sep 17 00:00:00 2001 From: Evin Yulo Date: Mon, 12 Sep 2022 18:13:48 +0000 Subject: [PATCH] Fix #12822: Clarify langref about the behavior of undefined --- doc/langref.html.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index 34fc7681c7..5da2697187 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -999,7 +999,8 @@ pub fn main() void {

In {#link|Debug#} mode, Zig writes {#syntax#}0xaa{#endsyntax#} bytes to undefined memory. This is to catch - bugs early, and to help detect use of undefined memory in a debugger. + bugs early, and to help detect use of undefined memory in a debugger. However, this behavior is only an + implementation feature, not a language semantic, so it is not guaranteed to be observable to code.

{#header_close#} {#header_close#}