From c4b1c46b46d8b78098e4cac1cc9eb41dee2a4d3d Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 15 Jul 2019 13:39:39 +0200 Subject: [PATCH 1/1] fix typo --- personal/_posts/2019-07-14-uninit.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/personal/_posts/2019-07-14-uninit.md b/personal/_posts/2019-07-14-uninit.md index 314ca95..c6ee054 100644 --- a/personal/_posts/2019-07-14-uninit.md +++ b/personal/_posts/2019-07-14-uninit.md @@ -65,7 +65,7 @@ Compilers don't just want to annoy programmers. Ruling out operations such as comparison on uninitialized data is useful, because it means the compiler does not have to "remember" which exact bit pattern an uninitialized variable has! A well-behaved (UB-free) program cannot observe that bit pattern anyway. So each time an uninitialized variable gets used, we can just use *any* machine register---and for different uses, those can be different registers! -So, one time we "look" at `x` it can be at least 150, and then when we look at it again it is less than 120, even though `x` did not change. +So, one time we "look" at `x` it can be at least 150, and then when we look at it again it is at most 120, even though `x` did not change. `x` was just uninitialized all the time. That explains why our compiled example program behaves the way it does. -- 2.30.2